|
||||||||||
| 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.user.client.ui.rta.cmd.internal.InlineStyleExecutable
org.xwiki.gwt.user.client.ui.rta.cmd.internal.ToggleInlineStyleExecutable
org.xwiki.gwt.wysiwyg.client.plugin.format.exec.RemoveFormatExecutable
public class RemoveFormatExecutable
Removes the in-line style from the current selection.
| Field Summary | |
|---|---|
static String |
CSS_TEXT
The property of the style object which holds the value of the style attribute. |
static List<String> |
DO_NOT_SPLIT
The list of HTML tags that shouldn't be split while removing the in-line style. |
| 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 | |
|---|---|
RemoveFormatExecutable(RichTextArea rta)
Creates a new executable that can be used to remove the in-line style from the current text selection. |
|
| Method Summary | |
|---|---|
protected Stack<com.google.gwt.dom.client.Node> |
getInlineAncestorsStack(com.google.gwt.dom.client.Node node)
Computes the stack of in-line ancestors, starting with the given node and ending with its top most in-line ancestor. |
String |
getParameter()
|
boolean |
isExecuted()
|
protected void |
isolateUpTo(com.google.gwt.dom.client.Node child,
com.google.gwt.dom.client.Node top)
Isolates the ancestors of the given child node up to the specified top ancestor. |
protected TextFragment |
removeStyle(Text text,
int firstCharIndex,
int lastCharIndex)
|
protected void |
reorder(com.google.gwt.dom.client.Node top,
com.google.gwt.dom.client.Node child)
Moves the parent of the given child node before the specified top and replicates three times the ancestors up to the top: once for the left siblings of the given child node, once the child node itself and once for the right siblings of the given child node. |
protected boolean |
splitParenStyle(com.google.gwt.dom.client.Node child)
Removes the in-line style from the parent of the given node and applies it to the given node's siblings. |
| Methods inherited from class org.xwiki.gwt.user.client.ui.rta.cmd.internal.ToggleInlineStyleExecutable |
|---|
addStyle, execute, execute, isExecuted, matchesInheritedStyle, matchesStyle, matchesStyle |
| Methods inherited from class org.xwiki.gwt.user.client.ui.rta.cmd.internal.InlineStyleExecutable |
|---|
addStyle, execute, getNonEmptyTextNodes, getParameter, getParameter, getParameter, getProperty |
| Methods inherited from class org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractSelectionExecutable |
|---|
hasValidSelection, isEnabled |
| 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 |
|---|
public static final String CSS_TEXT
public static final List<String> DO_NOT_SPLIT
span
tag in this list!
| Constructor Detail |
|---|
public RemoveFormatExecutable(RichTextArea rta)
rta - the execution target| Method Detail |
|---|
protected TextFragment removeStyle(Text text,
int firstCharIndex,
int lastCharIndex)
removeStyle in class org.xwiki.gwt.user.client.ui.rta.cmd.internal.ToggleInlineStyleExecutableToggleInlineStyleExecutable.removeStyle(Text, int, int)protected Stack<com.google.gwt.dom.client.Node> getInlineAncestorsStack(com.google.gwt.dom.client.Node node)
node - a DOM node
protected boolean splitParenStyle(com.google.gwt.dom.client.Node child)
child - a DOM node
true if the in-line style has been split, false otherwise
protected void reorder(com.google.gwt.dom.client.Node top,
com.google.gwt.dom.client.Node child)
top - the ancestor before which the parent is movedchild - the child node whose parent is moved before the top
protected void isolateUpTo(com.google.gwt.dom.client.Node child,
com.google.gwt.dom.client.Node top)
child - the child node whose ancestors will be isolatedtop - the top most ancestor that will be isolatedpublic boolean isExecuted()
isExecuted in interface ExecutableisExecuted in class org.xwiki.gwt.user.client.ui.rta.cmd.internal.ToggleInlineStyleExecutableToggleInlineStyleExecutable.isExecuted()public String getParameter()
getParameter in interface ExecutablegetParameter in class org.xwiki.gwt.user.client.ui.rta.cmd.internal.InlineStyleExecutableInlineStyleExecutable.getParameter()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||