|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.xpn.xwiki.wysiwyg.client.plugin.internal.AbstractPlugin
com.xpn.xwiki.wysiwyg.client.plugin.link.LinkPlugin
public class LinkPlugin
Rich text editor plug-in for inserting links, using a dialog to get link settings from the user. It installs a menu bar extension, with entries for all its actions.
| Constructor Summary | |
|---|---|
LinkPlugin(WikiServiceAsync wikiService)
Creates a new link plugin that will use the specified wiki service. |
|
| Method Summary | |
|---|---|
void |
destroy()
Notifies the plug-in to release its resources before being unloaded from the WYSIWYG editor. |
protected void |
dispatchLinkWizard(LinkConfig linkParams)
Instantiates and runs the correct wizard for the passed link. |
protected LinkConfig |
getCreateLinkParams()
Prepares the link parameters for a link creation, i.e. |
protected LinkConfig |
getEditLinkParams(java.lang.String linkCommandParameter)
Prepares the link parameters for a link edition, from the passed link parameter, as returned by the CreateLinkExecutable#getParameter(RichTextArea). |
protected LinkConfig |
getLinkParams()
|
void |
init(RichTextArea textArea,
Config config)
Initialize the plug-in. |
void |
onCancel(Wizard sender)
. |
void |
onFinish(Wizard sender,
java.lang.Object result)
. |
void |
onLinkEdit()
Handles the edit of a link: prepares and shows the link wizard. |
void |
onLinkInsert(LinkConfig.LinkType linkType)
Handles the creation of a link of the specified type: prepares and shows the link wizard. |
void |
onUnlink()
Executed when the unlink button is clicked. |
protected void |
parseLabelFromImage(LinkConfig linkConfig,
java.lang.String imageParam)
Helper method to parse an image execution String parameter and fill the passed LinkConfig from it. |
| Methods inherited from class com.xpn.xwiki.wysiwyg.client.plugin.internal.AbstractPlugin |
|---|
getConfig, getTextArea, getUIExtensionList, getUIExtensions, saveRegistration, saveRegistrations |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LinkPlugin(WikiServiceAsync wikiService)
wikiService - the service used to access the wiki| Method Detail |
|---|
public void init(RichTextArea textArea,
Config config)
init in interface Plugininit in class com.xpn.xwiki.wysiwyg.client.plugin.internal.AbstractPlugintextArea - the text area of the editorconfig - the configuration objectAbstractPlugin.init(RichTextArea, Config)public void destroy()
destroy in interface Plugindestroy in class com.xpn.xwiki.wysiwyg.client.plugin.internal.AbstractPluginAbstractPlugin.destroy()public void onLinkInsert(LinkConfig.LinkType linkType)
linkType - the type of link to insertpublic void onLinkEdit()
protected void dispatchLinkWizard(LinkConfig linkParams)
linkParams - the parameters of the link to be configured through the wizardprotected LinkConfig getLinkParams()
protected LinkConfig getEditLinkParams(java.lang.String linkCommandParameter)
CreateLinkExecutable#getParameter(RichTextArea).
linkCommandParameter - the parameter of the executed Command.CREATE_LINK command.
protected LinkConfig getCreateLinkParams()
protected void parseLabelFromImage(LinkConfig linkConfig,
java.lang.String imageParam)
LinkConfig from it.
linkConfig - the link config to set the label toimageParam - the image parameter, as returned by the command managerpublic void onUnlink()
public void onFinish(Wizard sender,
java.lang.Object result)
LinkConfig setup through
the wizard and executing the Command.CREATE_LINK with it.
onFinish in interface WizardListenerpublic void onCancel(Wizard sender)
onCancel in interface WizardListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||