|
||||||||||
| 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
org.xwiki.gwt.wysiwyg.client.plugin.indent.exec.OutdentExecutable
public class OutdentExecutable
Outdent executable to handle valid XHTML lists outdent, semantically: when a list item is outdented, all its subitems are outdented as well.
| Field Summary | |
|---|---|
protected static java.lang.String |
LINE_BREAK_TAG
Line break tag, to help manage empty list items after outdenting sublists. |
| Fields inherited from class org.xwiki.gwt.wysiwyg.client.plugin.indent.exec.AbstractListExecutable |
|---|
LIST_ITEM_TAG, ORDERED_LIST_TAG, UNORDERED_LIST_TAG |
| 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 | |
|---|---|
OutdentExecutable(RichTextArea rta)
Creates a new executable that can be used to decrease the identation of list items inside 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 void |
execute(Element listItem)
Actually executes the operation on a single list item. Moves the passed lust item one level up, as a next sibling of the list item it takes part of. |
protected boolean |
executeOnMultipleItems(Range range,
boolean perform)
Executes this list operation on all items in the non-collapsed selection. |
protected void |
outdentFirstLevelItem(Element listItem,
Element parentList)
Outdents an element on the first level of the list, by splitting the list in two, and leaving the list item's content as text between the lists. |
void |
outdentItem(Element listItem,
Element parentList,
Element parentListItem)
Actually executes the outdent on listItem, with respect to the list it takes part of. |
| Methods inherited from class org.xwiki.gwt.wysiwyg.client.plugin.indent.exec.AbstractListExecutable |
|---|
execute, getListItem, isEnabled, isList |
| 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 LINE_BREAK_TAG
| Constructor Detail |
|---|
public OutdentExecutable(RichTextArea rta)
rta - the execution target| Method Detail |
|---|
protected boolean canExecute(Element listItem)
canExecute in class AbstractListExecutablelistItem - the list item to check if the command can be executed on
true if the command can be executed, false otherwiseprotected void execute(Element listItem)
AbstractListExecutable.canExecute(Element) on the same list item returns true. Moves the passed lust item one level up, as a next sibling of the list item it takes part of. If
it's a first level list item, it is pulled out of its list.
execute in class AbstractListExecutablelistItem - the list item to execute the operation on
protected 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).
executeOnMultipleItems in class AbstractListExecutablerange - 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 void outdentItem(Element listItem,
Element parentList,
Element parentListItem)
listItem, with respect to the list it takes part of.
listItem - the list item to outdentparentList - the list in which it is placedparentListItem - the list item in which this sublist is placed
protected void outdentFirstLevelItem(Element listItem,
Element parentList)
listItem - the list item that needs to be unindentedparentList - the parent list of this item
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||