org.xwiki.gwt.wysiwyg.client.syntax.rule
Class ImageSelectionBehaviourRule

java.lang.Object
  extended by org.xwiki.gwt.wysiwyg.client.syntax.rule.ImageSelectionBehaviourRule
All Implemented Interfaces:
ValidationRule

public class ImageSelectionBehaviourRule
extends java.lang.Object
implements ValidationRule

Validation rule used to define the behavior when the selection is on an image. This will disable features that refer to text formatting (bold, italic, superscript) and in general all features that use the selection as text or replace it with other elements (such as the symbol plugin).

Version:
$Id: ImageSelectionBehaviourRule.java 26786 2010-02-07 16:46:17Z mflorea $

Constructor Summary
ImageSelectionBehaviourRule()
           
 
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.
 java.lang.String[] getFeatures()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageSelectionBehaviourRule

public ImageSelectionBehaviourRule()
Method Detail

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 java.lang.String[] getFeatures()

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


Copyright © 2004-2010 XWiki. All Rights Reserved.