org.xwiki.gwt.user.client.ui.rta.cmd.internal
Class AbstractSelectionExecutable

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
All Implemented Interfaces:
Executable
Direct Known Subclasses:
AbstractBlockExecutable, AbstractListExecutable, AbstractTableFeature, CollapseExecutable, InlineStyleExecutable, InsertHTMLExecutable, RefreshExecutable, UnlinkExecutable

public abstract class AbstractSelectionExecutable
extends AbstractRichTextAreaExecutable

Base class for all executables that manipulate a DOM document using the selection and range APIs.


Field Summary
protected  Cache cache
          The object used to cache some of the evaluations done in this class.
protected  DOMUtils domUtils
          Collection of DOM utility methods.
 
Fields inherited from class org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractRichTextAreaExecutable
rta
 
Constructor Summary
AbstractSelectionExecutable(RichTextArea rta)
          Creates a new executable to be executed on the specified rich text area.
 
Method Summary
 String getParameter()
           
protected  boolean hasValidSelection()
           
 boolean isEnabled()
           
 boolean isExecuted()
           
 
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
 
Methods inherited from interface org.xwiki.gwt.user.client.ui.rta.cmd.Executable
execute
 

Field Detail

domUtils

protected final DOMUtils domUtils
Collection of DOM utility methods.


cache

protected final Cache cache
The object used to cache some of the evaluations done in this class.

Constructor Detail

AbstractSelectionExecutable

public AbstractSelectionExecutable(RichTextArea rta)
Creates a new executable to be executed on the specified rich text area.

Parameters:
rta - the execution target
Method Detail

getParameter

public String getParameter()
Returns:
the previous execution parameter, if Executable.isExecuted() returns true, null otherwise

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface Executable
Overrides:
isEnabled in class AbstractRichTextAreaExecutable
Returns:
true if this executable can be executed on its underlying execution target, false otherwise
See Also:
CommandManager.isEnabled(Command)

hasValidSelection

protected boolean hasValidSelection()
Returns:
true if the underlying rich text area has a valid selection, false otherwise

isExecuted

public boolean isExecuted()
Returns:
true if this executable has been executed on its underlying execution target, false otherwise area.
See Also:
CommandManager.isExecuted(Command)