|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xwiki.gwt.wysiwyg.client.gadget.GadgetWizardApi
public class GadgetWizardApi
The Gadget Wizard, along with its javascript API, allowing to create macros insert and edit wizards, to be used as gadget wizards. The javascript API allows this wizard to be used from javascript outside the WYSiWYG (e.g. the dashboard).
| Constructor Summary | |
|---|---|
GadgetWizardApi()
Creates a new gadget wizard. |
|
| Method Summary | |
|---|---|
void |
destroy()
Destroy this wizard. |
void |
edit(String macroCall,
String title)
Starts the edit wizard, to edit the specified macro call. |
void |
insert()
Starts the insert wizard, which will guide the user into choosing a macro and defining its parameters. |
void |
onCancel(Wizard sender)
|
protected void |
onEditDone(String macroCall,
String gadgetTitle)
Handles the call of the js callback when the edit is done. |
void |
onFinish(Wizard sender,
Object result)
|
protected void |
onInsertDone(String macroCall,
String gadgetTitle)
Handles the call of the js callback when the insert is done. |
static void |
publish()
Publishes the JavaScript API that can be used to create and control GadgetWizardApis. |
void |
setEditCallback(JavaScriptObject editHandler)
Sets the native js edit callback to be called when the edit wizard is done. |
void |
setInsertCallback(JavaScriptObject insertHandler)
Sets the native js insert callback to be called when the insert wizard is done. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GadgetWizardApi()
| Method Detail |
|---|
public void insert()
public void setInsertCallback(JavaScriptObject insertHandler)
insertHandler - the native js callback to call when the insert wizard is finished successfully.
protected void onInsertDone(String macroCall,
String gadgetTitle)
macroCall - the macro call used as a content of this gadgetgadgetTitle - the title of the gadget
public void edit(String macroCall,
String title)
macroCall - the macro call to edit, passed as a html comment from the annotated syntax.title - the title of the gadget to editpublic void setEditCallback(JavaScriptObject editHandler)
editHandler - the native js callback to call when the edit wizard is finished successfully.
protected void onEditDone(String macroCall,
String gadgetTitle)
macroCall - the new macro call used as a content of the edited gadgetgadgetTitle - the title of the gadgetpublic void onCancel(Wizard sender)
onCancel in interface WizardListenerWizardListener.onCancel(Wizard)
public void onFinish(Wizard sender,
Object result)
onFinish in interface WizardListenerWizardListener.onFinish(Wizard, Object)public void destroy()
public static void publish()
GadgetWizardApis.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||