com.xpn.xwiki.wysiwyg.client.plugin.internal
Class AbstractPlugin

java.lang.Object
  extended by com.xpn.xwiki.wysiwyg.client.plugin.internal.AbstractPlugin
All Implemented Interfaces:
Plugin
Direct Known Subclasses:
AttachmentPlugin, ColorPlugin, ImagePlugin, IndentPlugin, LinkPlugin, MacroPlugin, MiscPlugin, SeparatorPlugin, StatefulPlugin, SymbolPlugin, SyncPlugin, TablePlugin, UndoPlugin

public abstract class AbstractPlugin
extends java.lang.Object
implements Plugin

Abstract implementation of the Plugin interface. This could serve as a base class for all kind of plug-ins.


Constructor Summary
AbstractPlugin()
           
 
Method Summary
 void destroy()
          Notifies the plug-in to release its resources before being unloaded from the WYSIWYG editor.
protected  Config getConfig()
           
protected  XRichTextArea getTextArea()
           
protected  java.util.List<UIExtension> getUIExtensionList()
           
 UIExtension[] getUIExtensions()
          
protected  Wysiwyg getWysiwyg()
           
 void init(Wysiwyg wysiwyg, XRichTextArea textArea, Config config)
          Initialize the plug-in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPlugin

public AbstractPlugin()
Method Detail

getConfig

protected Config getConfig()

getTextArea

protected XRichTextArea getTextArea()

getWysiwyg

protected Wysiwyg getWysiwyg()

getUIExtensionList

protected java.util.List<UIExtension> getUIExtensionList()

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

getUIExtensions

public UIExtension[] getUIExtensions()

Specified by:
getUIExtensions in interface Plugin
Returns:
All the user interface extensions that are provided by this plug-in.
See Also:
Plugin.getUIExtensions()

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
See Also:
Plugin.destroy()


Copyright © 2004-2008 XWiki. All Rights Reserved.