org.xwiki.gwt.wysiwyg.client.plugin.image
Class ImagePlugin

java.lang.Object
  extended by org.xwiki.gwt.wysiwyg.client.plugin.internal.AbstractPlugin
      extended by org.xwiki.gwt.wysiwyg.client.plugin.image.ImagePlugin
All Implemented Interfaces:
com.google.gwt.event.dom.client.ClickHandler, com.google.gwt.event.shared.EventHandler, WizardListener, Plugin

public class ImagePlugin
extends org.xwiki.gwt.wysiwyg.client.plugin.internal.AbstractPlugin
implements com.google.gwt.event.dom.client.ClickHandler, WizardListener

Rich text editor plug-in for inserting images, using a dialog to get image data settings from the user. It installs one button in the toolbar, to be used for both insert and edit image actions.

Version:
$Id: 56879e24d2505fbc5e4b2ded27f2890b6eb62062 $

Constructor Summary
ImagePlugin(WikiServiceAsync wikiService)
          Create a new image plugin that used the specified wiki service.
 
Method Summary
 void destroy()
          
 void init(RichTextArea textArea, Config config)
          
 void onAttachedImage()
          Start the insert attached image wizard.
 void onCancel(Wizard sender)
          
 void onClick(com.google.gwt.event.dom.client.ClickEvent event)
          
 void onFinish(Wizard sender, Object result)
          
 void onImage()
          Function to handle the image event, when the tool bar button is clicked or the menu command is issued: either create a new image, or edit an existing image.
 void onImageEdit()
          Start the edit image wizard.
 void onImageRemove()
          Removes the selection if the insert image command is executed.
 void onURLImage()
          Start the insert external image wizard.
 
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

ImagePlugin

public ImagePlugin(WikiServiceAsync wikiService)
Create a new image plugin that used the specified wiki service.

Parameters:
wikiService - the service used to access the wiki
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(XRichTextArea, 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)

onImage

public void onImage()
Function to handle the image event, when the tool bar button is clicked or the menu command is issued: either create a new image, or edit an existing image.


onImageEdit

public void onImageEdit()
Start the edit image wizard.


onAttachedImage

public void onAttachedImage()
Start the insert attached image wizard.


onURLImage

public void onURLImage()
Start the insert external image wizard.


onImageRemove

public void onImageRemove()
Removes the selection if the insert image command is executed.


onFinish

public void onFinish(Wizard sender,
                     Object result)

Specified by:
onFinish in interface WizardListener

onCancel

public void onCancel(Wizard sender)

Specified by:
onCancel in interface WizardListener


Copyright © 2004-2012 XWiki. All Rights Reserved.