org.xwiki.gwt.user.client.ui.rta.cmd.internal
Class AbstractSelectionExecutable
java.lang.Object
org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractRichTextAreaExecutable
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. |
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 |
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.
AbstractSelectionExecutable
public AbstractSelectionExecutable(RichTextArea rta)
- Creates a new executable to be executed on the specified rich text area.
- Parameters:
rta
- the execution target
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)