org.xwiki.gwt.wysiwyg.client.syntax.internal
Class DisablingRule
java.lang.Object
org.xwiki.gwt.wysiwyg.client.syntax.internal.DisablingRule
- All Implemented Interfaces:
- ValidationRule
public class DisablingRule
- extends Object
- implements ValidationRule
Utility rule for disabling some of the editor's features.
Constructor Summary |
DisablingRule(String[] features)
Creates a new validation rule that always disables the specified features. |
Method Summary |
boolean |
areValid(RichTextArea textArea)
Verifies if the underlying features of this rule should be enabled considering the current state of the given
text area. |
String[] |
getFeatures()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DisablingRule
public DisablingRule(String[] features)
- Creates a new validation rule that always disables the specified features.
- Parameters:
features
- the features to be disabled
areValid
public boolean areValid(RichTextArea textArea)
- Verifies if the underlying features of this rule should be enabled considering the current state of the given
text area.
- Specified by:
areValid
in interface ValidationRule
- Parameters:
textArea
- The text area whose current state should be considered.
- Returns:
- true if all the underlying features should be enabled, false otherwise.
- See Also:
ValidationRule.areValid(RichTextArea)
getFeatures
public String[] getFeatures()
-
- Specified by:
getFeatures
in interface ValidationRule
- Returns:
- The features this rule is referring to.
- See Also:
ValidationRule.getFeatures()