com.xpn.xwiki.wysiwyg.client.plugin.color
Class ColorPlugin

java.lang.Object
  extended by com.xpn.xwiki.wysiwyg.client.plugin.internal.AbstractPlugin
      extended by com.xpn.xwiki.wysiwyg.client.plugin.color.ColorPlugin
All Implemented Interfaces:
com.google.gwt.user.client.ui.ClickListener, com.google.gwt.user.client.ui.PopupListener, Plugin, java.util.EventListener

public class ColorPlugin
extends AbstractPlugin
implements com.google.gwt.user.client.ui.ClickListener, com.google.gwt.user.client.ui.PopupListener

XRichTextEditor plug-in for controlling the text color and the background color. It installs two push buttons on the tool bar, each opening a color picker dialog, which is synchronized with the text area.


Constructor Summary
ColorPlugin()
           
 
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 onBackColor(boolean show)
           
 void onClick(com.google.gwt.user.client.ui.Widget sender)
          
 void onForeColor(boolean show)
           
 void onPopupClosed(com.google.gwt.user.client.ui.PopupPanel sender, boolean autoHide)
          
 
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

ColorPlugin

public ColorPlugin()
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()

onClick

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

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

onPopupClosed

public void onPopupClosed(com.google.gwt.user.client.ui.PopupPanel sender,
                          boolean autoHide)

Specified by:
onPopupClosed in interface com.google.gwt.user.client.ui.PopupListener
See Also:
PopupListener.onPopupClosed(PopupPanel, boolean)

onForeColor

public void onForeColor(boolean show)

onBackColor

public void onBackColor(boolean show)


Copyright © 2004-2008 XWiki. All Rights Reserved.