org.xwiki.gwt.wysiwyg.client.plugin.image.exec
Class InsertImageExecutable

java.lang.Object
  extended by org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractRichTextAreaExecutable
      extended by org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractSelectionExecutable
          extended by org.xwiki.gwt.user.client.ui.rta.cmd.internal.InsertHTMLExecutable
              extended by org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractInsertElementExecutable<ImageConfig,com.google.gwt.dom.client.ImageElement>
                  extended by org.xwiki.gwt.wysiwyg.client.plugin.image.exec.InsertImageExecutable
All Implemented Interfaces:
Executable

public class InsertImageExecutable
extends org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractInsertElementExecutable<ImageConfig,com.google.gwt.dom.client.ImageElement>

Handles the insertion of an image, passed through its corresponding HTML block.

Version:
$Id: InsertImageExecutable.java 31114 2010-09-15 08:30:17Z mflorea $

Nested Class Summary
 
Nested classes/interfaces inherited from class org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractInsertElementExecutable
org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractInsertElementExecutable.AbstractConfigJSONSerializer<C>, org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractInsertElementExecutable.ConfigDOMReader<C,E extends com.google.gwt.dom.client.Element>, org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractInsertElementExecutable.ConfigDOMWriter<C,E extends com.google.gwt.dom.client.Element>, org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractInsertElementExecutable.ConfigJSONParser<C>, org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractInsertElementExecutable.ConfigJSONSerializer<C>
 
Field Summary
 
Fields inherited from class org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractInsertElementExecutable
configDOMReader, configDOMWriter, configJSONParser, configJSONSerializer
 
Fields inherited from class org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractSelectionExecutable
cache, domUtils
 
Fields inherited from class org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractRichTextAreaExecutable
rta
 
Constructor Summary
InsertImageExecutable(RichTextArea rta)
          Creates a new executable that can be used to insert images in the specified rich text area.
 
Method Summary
protected  java.lang.String getCacheKeyPrefix()
          
protected  com.google.gwt.dom.client.ImageElement getSelectedElement()
          
protected  com.google.gwt.dom.client.ImageElement newElement()
          
protected  void write(ImageConfig config, com.google.gwt.dom.client.ImageElement image)
          
 
Methods inherited from class org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractInsertElementExecutable
execute, getParameter, isExecuted
 
Methods inherited from class org.xwiki.gwt.user.client.ui.rta.cmd.internal.InsertHTMLExecutable
execute, insertNode
 
Methods inherited from class org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractSelectionExecutable
hasValidSelection, isEnabled
 
Methods inherited from class org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractRichTextAreaExecutable
isSupported
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InsertImageExecutable

public InsertImageExecutable(RichTextArea rta)
Creates a new executable that can be used to insert images in the specified rich text area.

Parameters:
rta - the execution target
Method Detail

write

protected void write(ImageConfig config,
                     com.google.gwt.dom.client.ImageElement image)

Overrides:
write in class org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractInsertElementExecutable<ImageConfig,com.google.gwt.dom.client.ImageElement>
See Also:
AbstractInsertElementExecutable.write(Object, com.google.gwt.dom.client.Element)

getCacheKeyPrefix

protected java.lang.String getCacheKeyPrefix()

Specified by:
getCacheKeyPrefix in class org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractInsertElementExecutable<ImageConfig,com.google.gwt.dom.client.ImageElement>
See Also:
AbstractInsertElementExecutable.getCacheKeyPrefix()

getSelectedElement

protected com.google.gwt.dom.client.ImageElement getSelectedElement()

Gets the image element in the current selection.

Specified by:
getSelectedElement in class org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractInsertElementExecutable<ImageConfig,com.google.gwt.dom.client.ImageElement>
See Also:
AbstractInsertElementExecutable.getSelectedElement()

newElement

protected com.google.gwt.dom.client.ImageElement newElement()

Specified by:
newElement in class org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractInsertElementExecutable<ImageConfig,com.google.gwt.dom.client.ImageElement>
See Also:
AbstractInsertElementExecutable.newElement()


Copyright © 2004-2011 XWiki. All Rights Reserved.