public class BlockStyleNameExecutable extends org.xwiki.gwt.user.client.ui.rta.cmd.internal.BlockStyleExecutable
cache, domUtilsrta| Constructor and Description |
|---|
BlockStyleNameExecutable(RichTextArea rta)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addStyle(Element element,
String styleName) |
protected void |
execute(com.google.gwt.dom.client.Node node,
int startOffset,
int endOffset,
String value) |
boolean |
execute(String parameter) |
String |
getParameter() |
protected Set<String> |
getStyleNames(com.google.gwt.dom.client.Node node) |
protected Set<String> |
getStyleNames(Range range) |
protected Set<String> |
getStyleNames(Selection selection) |
boolean |
isExecuted() |
protected boolean |
matchesStyleName(com.google.gwt.dom.client.Node node,
String styleName) |
protected void |
removeStyleName(com.google.gwt.dom.client.Node node,
String styleName)
Removes the specified style name from the block-level ancestors of the given DOM node.
|
getParameterexecute, execute, getParameter, wraphasValidSelection, isEnabledisSupportedpublic BlockStyleNameExecutable(RichTextArea rta)
rta - the execution targetpublic boolean execute(String parameter)
execute in interface Executableexecute in class org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractBlockExecutableAbstractBlockExecutable.execute(String)protected void execute(com.google.gwt.dom.client.Node node,
int startOffset,
int endOffset,
String value)
execute in class org.xwiki.gwt.user.client.ui.rta.cmd.internal.BlockStyleExecutableBlockStyleExecutable.execute(Node, int, int, String)protected void addStyle(Element element, String styleName)
addStyle in class org.xwiki.gwt.user.client.ui.rta.cmd.internal.BlockStyleExecutableBlockStyleExecutable.addStyle(Element, String)protected void removeStyleName(com.google.gwt.dom.client.Node node,
String styleName)
node - a DOM nodestyleName - the style name to be removedprotected boolean matchesStyleName(com.google.gwt.dom.client.Node node,
String styleName)
node - a DOM nodestyleName - a style nametrue if any of the block-level ancestors of the given node has the specified style name, false otherwisepublic String getParameter()
getParameter in interface ExecutablegetParameter in class org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractBlockExecutableAbstractBlockExecutable.getParameter()protected Set<String> getStyleNames(Selection selection)
selection - a text selectionprotected Set<String> getStyleNames(Range range)
range - a text rangeprotected Set<String> getStyleNames(com.google.gwt.dom.client.Node node)
node - a DOM nodepublic boolean isExecuted()
isExecuted in interface ExecutableisExecuted in class org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractSelectionExecutableAbstractSelectionExecutable.isExecuted()Copyright © 2004–2015 XWiki. All rights reserved.