public class IndentExecutable extends AbstractListExecutable
LIST_ITEM_TAG, ORDERED_LIST_TAG, UNORDERED_LIST_TAGcache, domUtilsrta| Constructor and Description |
|---|
IndentExecutable(RichTextArea rta)
Creates a new executable that can be used to indent list items inside the specified rich text area.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
protected boolean |
executeOnMultipleItems(Range range,
boolean perform)
Executes this list operation on all items in the non-collapsed selection.
|
execute, getListItem, isEnabled, isListgetParameter, hasValidSelection, isExecutedisSupportedpublic IndentExecutable(RichTextArea rta)
rta - the execution targetprotected boolean executeOnMultipleItems(Range range, boolean perform)
AbstractListExecutableperform 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
AbstractListExecutable.execute(String) and AbstractListExecutable.isEnabled() 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 checkedtrue if at least one of the items in the selection was affected, false otherwise.protected boolean canExecute(Element listItem)
AbstractListExecutablecanExecute in class AbstractListExecutablelistItem - the list item to check if the command can be executed ontrue if the command can be executed, false otherwiseprotected void execute(Element listItem)
AbstractListExecutable.canExecute(Element) on the same list item returns true..
Performs the indent of the passed list item, if possible: it turns it into the child list item of its previous sibling, if such an element exists, also handling the merge if the previous sibling already has a sublist.
execute in class AbstractListExecutablelistItem - the list item to execute the operation onCopyright © 2004–2016 XWiki. All rights reserved.