com.xpn.xwiki.wysiwyg.client.plugin.format
Class FormatPlugin

java.lang.Object
  extended by com.xpn.xwiki.wysiwyg.client.plugin.internal.AbstractPlugin
      extended by com.xpn.xwiki.wysiwyg.client.plugin.internal.StatefulPlugin
          extended by com.xpn.xwiki.wysiwyg.client.plugin.format.FormatPlugin
All Implemented Interfaces:
com.google.gwt.user.client.ui.ChangeListener, com.google.gwt.user.client.ui.ClickListener, com.google.gwt.user.client.ui.KeyboardListener, Plugin, CommandListener, DeferredUpdate, java.util.EventListener

public class FormatPlugin
extends StatefulPlugin
implements com.google.gwt.user.client.ui.ChangeListener

XRichTextEditor plug-in for formatting text. It can be used to format text as heading 1 to 5. It installs a select on the tool bar and updates its status depending on the current cursor position.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.xpn.xwiki.wysiwyg.client.util.DeferredUpdate
DeferredUpdate.UpdateCommand
 
Field Summary
 
Fields inherited from interface com.google.gwt.user.client.ui.KeyboardListener
KEY_ALT, KEY_BACKSPACE, KEY_CTRL, KEY_DELETE, KEY_DOWN, KEY_END, KEY_ENTER, KEY_ESCAPE, KEY_HOME, KEY_LEFT, KEY_PAGEDOWN, KEY_PAGEUP, KEY_RIGHT, KEY_SHIFT, KEY_TAB, KEY_UP, MODIFIER_ALT, MODIFIER_CTRL, MODIFIER_META, MODIFIER_SHIFT
 
Constructor Summary
FormatPlugin()
           
 
Method Summary
 void destroy()
          Notifies the plug-in to release its resources before being unloaded from the WYSIWYG editor.
 void init(Wysiwyg wysiwyg, XRichTextArea textArea, Config config)
          Initialize the plug-in.
 void onChange(com.google.gwt.user.client.ui.Widget sender)
          
 void onFormat()
           
 void onUpdate()
          Executes the most recent update.
 
Methods inherited from class com.xpn.xwiki.wysiwyg.client.plugin.internal.StatefulPlugin
getUpdateIndex, incUpdateIndex, onClick, onCommand, onKeyDown, onKeyPress, onKeyUp
 
Methods inherited from class com.xpn.xwiki.wysiwyg.client.plugin.internal.AbstractPlugin
getConfig, getTextArea, getUIExtensionList, getUIExtensions, getWysiwyg
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormatPlugin

public FormatPlugin()
Method Detail

init

public void init(Wysiwyg wysiwyg,
                 XRichTextArea 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:
wysiwyg - The WYSIWYG application context.
textArea - The text area of the editor.
config - The configuration.
See Also:
AbstractPlugin.init(Wysiwyg, XRichTextArea, 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()

onChange

public void onChange(com.google.gwt.user.client.ui.Widget sender)

Specified by:
onChange in interface com.google.gwt.user.client.ui.ChangeListener
See Also:
ChangeListener.onChange(Widget)

onFormat

public void onFormat()

onUpdate

public void onUpdate()
Executes the most recent update.

Specified by:
onUpdate in interface DeferredUpdate
See Also:
DeferredUpdate.onUpdate()


Copyright © 2004-2008 XWiki. All Rights Reserved.