com.xpn.xwiki.wysiwyg.client.syntax.internal
Class DefaultValidationRule

java.lang.Object
  extended by com.xpn.xwiki.wysiwyg.client.syntax.internal.DefaultValidationRule
All Implemented Interfaces:
ValidationRule

public class DefaultValidationRule
extends java.lang.Object
implements ValidationRule

Validation rule for text area's commands. Verifies if a specific command can be executed on the current state of the given text area.


Constructor Summary
DefaultValidationRule(java.lang.String feature, Command command)
           
 
Method Summary
 boolean areValid(XRichTextArea textArea)
          Verifies if the underlying features of this rule should be enabled considering the current state of the given text area.
 java.lang.String[] getFeatures()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultValidationRule

public DefaultValidationRule(java.lang.String feature,
                             Command command)
Method Detail

areValid

public boolean areValid(XRichTextArea 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(XRichTextArea)

getFeatures

public java.lang.String[] getFeatures()

Specified by:
getFeatures in interface ValidationRule
Returns:
The features this rule is referring to.
See Also:
ValidationRule.getFeatures()


Copyright © 2004-2008 XWiki. All Rights Reserved.