org.xwiki.gwt.wysiwyg.client.plugin.color
Class ColorPlugin

java.lang.Object
  extended by org.xwiki.gwt.wysiwyg.client.plugin.internal.AbstractPlugin
      extended by org.xwiki.gwt.wysiwyg.client.plugin.color.ColorPlugin
All Implemented Interfaces:
com.google.gwt.event.dom.client.ClickHandler, com.google.gwt.event.logical.shared.CloseHandler<com.google.gwt.user.client.ui.PopupPanel>, com.google.gwt.event.shared.EventHandler, Plugin

public class ColorPlugin
extends org.xwiki.gwt.wysiwyg.client.plugin.internal.AbstractPlugin
implements com.google.gwt.event.dom.client.ClickHandler, com.google.gwt.event.logical.shared.CloseHandler<com.google.gwt.user.client.ui.PopupPanel>

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.

Version:
$Id: a1d57ed211f06bd0b608e8b7e4807bb138d9bc40 $

Field Summary
static String DEFAULT_COLORS
          The colors available by default on the color palette.
static String DEFAULT_COLUMN_COUNT
          The default number of columns displayed by the color palette.
 
Constructor Summary
ColorPlugin()
           
 
Method Summary
 void destroy()
          
protected  ColorPicker getColorPicker()
          Lazy loads the color picker.
 void init(RichTextArea textArea, Config config)
          
 void onClick(com.google.gwt.event.dom.client.ClickEvent event)
          
 void onClose(com.google.gwt.event.logical.shared.CloseEvent<com.google.gwt.user.client.ui.PopupPanel> event)
          
 
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
 

Field Detail

DEFAULT_COLORS

public static final String DEFAULT_COLORS
The colors available by default on the color palette.

See Also:
Constant Field Values

DEFAULT_COLUMN_COUNT

public static final String DEFAULT_COLUMN_COUNT
The default number of columns displayed by the color palette.

See Also:
Constant Field Values
Constructor Detail

ColorPlugin

public ColorPlugin()
Method Detail

init

public void init(RichTextArea textArea,
                 Config config)

Specified by:
init in interface Plugin
Overrides:
init in class org.xwiki.gwt.wysiwyg.client.plugin.internal.AbstractPlugin
See Also:
AbstractPlugin.init(RichTextArea, Config)

destroy

public void destroy()

Specified by:
destroy in interface Plugin
Overrides:
destroy in class org.xwiki.gwt.wysiwyg.client.plugin.internal.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<com.google.gwt.user.client.ui.PopupPanel> event)

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

getColorPicker

protected ColorPicker getColorPicker()
Lazy loads the color picker.

Returns:
the color picker


Copyright © 2004–2014 XWiki. All rights reserved.