org.xwiki.gwt.wysiwyg.client.plugin.symbol
Class SymbolPlugin

java.lang.Object
  extended by org.xwiki.gwt.wysiwyg.client.plugin.internal.AbstractPlugin
      extended by org.xwiki.gwt.wysiwyg.client.plugin.symbol.SymbolPlugin
All Implemented Interfaces:
com.google.gwt.event.dom.client.ClickHandler, com.google.gwt.event.logical.shared.CloseHandler<CompositeDialogBox>, com.google.gwt.event.shared.EventHandler, Plugin

public class SymbolPlugin
extends AbstractPlugin
implements com.google.gwt.event.dom.client.ClickHandler, com.google.gwt.event.logical.shared.CloseHandler<CompositeDialogBox>

Allows the user to insert a special symbol chosen with a symbol picker in place of the current selection.


Constructor Summary
SymbolPlugin()
           
 
Method Summary
 void destroy()
          Notifies the plug-in to release its resources before being unloaded from the WYSIWYG editor.
 void init(RichTextArea textArea, Config config)
          Initialize the plug-in.
 void onClick(com.google.gwt.event.dom.client.ClickEvent event)
          
 void onClose(com.google.gwt.event.logical.shared.CloseEvent<CompositeDialogBox> event)
          
 void onSymbols(boolean show)
          Either shows the symbol picker dialog or inserts the chosen symbol depending in the given flag.
 
Methods inherited from class org.xwiki.gwt.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

SymbolPlugin

public SymbolPlugin()
Method Detail

init

public void init(RichTextArea textArea,
                 Config config)
Initialize the plug-in. Plug-ins need to know the text area in order to provide only those feature that are supported.

Specified by:
init in interface Plugin
Overrides:
init in class AbstractPlugin
Parameters:
textArea - the text area of the editor
config - the configuration object
See Also:
AbstractPlugin.init(RichTextArea, Config)

destroy

public void destroy()
Notifies the plug-in to release its resources before being unloaded from the WYSIWYG editor.

Specified by:
destroy in interface Plugin
Overrides:
destroy in class AbstractPlugin
See Also:
AbstractPlugin.destroy()

onClick

public void onClick(com.google.gwt.event.dom.client.ClickEvent event)

Specified by:
onClick in interface com.google.gwt.event.dom.client.ClickHandler
See Also:
ClickHandler.onClick(ClickEvent)

onClose

public void onClose(com.google.gwt.event.logical.shared.CloseEvent<CompositeDialogBox> event)

Specified by:
onClose in interface com.google.gwt.event.logical.shared.CloseHandler<CompositeDialogBox>
See Also:
CloseHandler.onClose(CloseEvent)

onSymbols

public void onSymbols(boolean show)
Either shows the symbol picker dialog or inserts the chosen symbol depending in the given flag.

Parameters:
show - whether to show the symbol picker or insert the chosen symbol.