|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xwiki.gwt.wysiwyg.client.syntax.internal.DefaultSyntaxValidator
public class DefaultSyntaxValidator
Base class for syntax-specific validators. It includes by default syntax-independent rules.
Constructor Summary | |
---|---|
DefaultSyntaxValidator(String syntax)
Creates a new validator for the given syntax. |
Method Summary | |
---|---|
void |
addValidationRule(ValidationRule rule)
Adds a new validation rule to the list of rules this syntax validator obeys. |
String |
getSyntax()
|
boolean |
isValid(String feature,
RichTextArea textArea)
Verifies if a specific feature of the editor should be enabled, considering the current list of validation rules and the current state of the given text area. |
void |
removeValidationRule(ValidationRule rule)
Removes the specified rule from the list of validation rules this syntax validator obeys. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultSyntaxValidator(String syntax)
syntax
- syntax
Method Detail |
---|
public void addValidationRule(ValidationRule rule)
addValidationRule
in interface SyntaxValidator
rule
- The validation rule to be added.SyntaxValidator.addValidationRule(ValidationRule)
public String getSyntax()
getSyntax
in interface SyntaxValidator
SyntaxValidator.getSyntax()
public boolean isValid(String feature, RichTextArea textArea)
isValid
in interface SyntaxValidator
feature
- The feature to be tested.textArea
- The text area whose current state should be considered.
SyntaxValidator.isValid(String, RichTextArea)
public void removeValidationRule(ValidationRule rule)
removeValidationRule
in interface SyntaxValidator
rule
- The validation rule to be removed.SyntaxValidator.removeValidationRule(ValidationRule)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |