|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractRichTextAreaExecutable
org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractSelectionExecutable
org.xwiki.gwt.wysiwyg.client.plugin.indent.exec.AbstractListExecutable
public abstract class AbstractListExecutable
Superclass for all the list executables, such as indent and outdent executables, to handle frequent list operations.
| Field Summary | |
|---|---|
protected static java.lang.String |
LIST_ITEM_TAG
List item element name. |
protected static java.lang.String |
ORDERED_LIST_TAG
Ordered list element name. |
protected static java.lang.String |
UNORDERED_LIST_TAG
Unordered list element name. |
| 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 | |
|---|---|
AbstractListExecutable(RichTextArea rta)
Creates a new executable to be executed on the specified rich text area. |
|
| Method Summary | |
|---|---|
protected boolean |
canExecute(Element listItem)
Checks if this command can be executed on a single list item. |
protected abstract void |
execute(Element listItem)
Actually executes the operation on a single list item. |
boolean |
execute(java.lang.String param)
|
protected abstract boolean |
executeOnMultipleItems(Range range,
boolean perform)
Executes this list operation on all items in the non-collapsed selection. |
protected Element |
getListItem(Range range)
|
boolean |
isEnabled()
|
protected boolean |
isList(com.google.gwt.dom.client.Node node)
Checks if the passed node is a list node: either an ordered list or an unordered one. |
| Methods inherited from class org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractSelectionExecutable |
|---|
getParameter, hasValidSelection, 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 |
| Field Detail |
|---|
protected static final java.lang.String LIST_ITEM_TAG
protected static final java.lang.String UNORDERED_LIST_TAG
protected static final java.lang.String ORDERED_LIST_TAG
| Constructor Detail |
|---|
public AbstractListExecutable(RichTextArea rta)
rta - the execution target| Method Detail |
|---|
protected Element getListItem(Range range)
range - a DOM range
null if no such thing existsprotected boolean isList(com.google.gwt.dom.client.Node node)
node - the node to check if it's a list or not
public boolean execute(java.lang.String param)
protected abstract void execute(Element listItem)
canExecute(Element) on the same list item returns true.
listItem - the list item to execute the operation onprotected boolean canExecute(Element listItem)
listItem - the list item to check if the command can be executed on
true if the command can be executed, false otherwise
protected abstract boolean executeOnMultipleItems(Range range,
boolean perform)
perform parameter specifies
if the operation is actually performed or just checked to be possible (while this kind of parameters are not good
practice, it's the best way right now to make sure we use the same detection algorithm in the
#execute(RichTextArea, String) and #isEnabled(RichTextArea) functions).
range - the current range to execute the operation onperform - true if the operation is to be actually executed, false if it's only to be checked
true if at least one of the items in the selection was affected, false otherwise.public boolean isEnabled()
isEnabled in interface ExecutableisEnabled in class org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractSelectionExecutableisEnabled()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||