com.xpn.xwiki.wysiwyg.client.ui.cmd.internal
Class StyleExecutable

java.lang.Object
  extended by com.xpn.xwiki.wysiwyg.client.ui.cmd.internal.AbstractExecutable
      extended by com.xpn.xwiki.wysiwyg.client.ui.cmd.internal.DefaultExecutable
          extended by com.xpn.xwiki.wysiwyg.client.ui.cmd.internal.StyleExecutable
All Implemented Interfaces:
Executable
Direct Known Subclasses:
BoldExecutable

public class StyleExecutable
extends DefaultExecutable


Field Summary
 
Fields inherited from class com.xpn.xwiki.wysiwyg.client.ui.cmd.internal.DefaultExecutable
command
 
Constructor Summary
StyleExecutable(java.lang.String tagName, java.lang.String className, java.lang.String propertyName, java.lang.String propertyValue, boolean inheritable, java.lang.String command)
           
 
Method Summary
protected  Range addStyle(com.google.gwt.dom.client.IFrameElement iframe, Range range)
           
protected  void addStyle(com.google.gwt.dom.client.Text text, int beginIndex, int endIndex)
           
 boolean execute(com.google.gwt.user.client.Element target, java.lang.String parameter)
          Executes the associated Command on the specified target with the given parameter.
 java.lang.String getClassName()
           
 java.lang.String getParameter(com.google.gwt.user.client.Element target)
          
 java.lang.String getProeprtyValue()
           
 java.lang.String getPropertyName()
           
 java.lang.String getTagName()
           
 boolean isEnabled(com.google.gwt.user.client.Element target)
          
 boolean isExecuted(com.google.gwt.user.client.Element target)
          
 boolean isSupported(com.google.gwt.user.client.Element target)
          
protected  boolean matchesStyle(com.google.gwt.dom.client.Node node)
           
protected  Range removeStyle(com.google.gwt.dom.client.IFrameElement iframe, Range range)
           
protected  void removeStyle(com.google.gwt.dom.client.Text text, int beginIndex, int endIndex)
           
 
Methods inherited from class com.xpn.xwiki.wysiwyg.client.ui.cmd.internal.AbstractExecutable
execute, getParameter, isEnabled, isExecuted, isSupported
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StyleExecutable

public StyleExecutable(java.lang.String tagName,
                       java.lang.String className,
                       java.lang.String propertyName,
                       java.lang.String propertyValue,
                       boolean inheritable,
                       java.lang.String command)
Method Detail

getTagName

public java.lang.String getTagName()

getClassName

public java.lang.String getClassName()

getPropertyName

public java.lang.String getPropertyName()

getProeprtyValue

public java.lang.String getProeprtyValue()

execute

public boolean execute(com.google.gwt.user.client.Element target,
                       java.lang.String parameter)
Executes the associated Command on the specified target with the given parameter.

Specified by:
execute in interface Executable
Overrides:
execute in class DefaultExecutable
Parameters:
target - Execution target.
parameter - Execution parameter.
Returns:
true if execution succeeds.
See Also:
Executable.execute(Element, String)

addStyle

protected Range addStyle(com.google.gwt.dom.client.IFrameElement iframe,
                         Range range)

addStyle

protected void addStyle(com.google.gwt.dom.client.Text text,
                        int beginIndex,
                        int endIndex)

removeStyle

protected Range removeStyle(com.google.gwt.dom.client.IFrameElement iframe,
                            Range range)

removeStyle

protected void removeStyle(com.google.gwt.dom.client.Text text,
                           int beginIndex,
                           int endIndex)

getParameter

public java.lang.String getParameter(com.google.gwt.user.client.Element target)

Specified by:
getParameter in interface Executable
Overrides:
getParameter in class DefaultExecutable
Parameters:
target - Execution target.
Returns:
the previous execution parameter, if Executable.isExecuted(Element) returns true, null otherwise.
See Also:
Executable.getParameter(Element)

isEnabled

public boolean isEnabled(com.google.gwt.user.client.Element target)

Specified by:
isEnabled in interface Executable
Overrides:
isEnabled in class DefaultExecutable
Parameters:
target - Execution target.
Returns:
true if the associated Command can be executed on the current state of the given target.
See Also:
Executable.isEnabled(Element)

isExecuted

public boolean isExecuted(com.google.gwt.user.client.Element target)

Specified by:
isExecuted in interface Executable
Overrides:
isExecuted in class DefaultExecutable
Parameters:
target - Execution target.
Returns:
true if the associated Command has been executed on the current state of the given target.
See Also:
Executable.isExecuted(Element)

isSupported

public boolean isSupported(com.google.gwt.user.client.Element target)

Specified by:
isSupported in interface Executable
Overrides:
isSupported in class DefaultExecutable
Parameters:
target - Execution target.
Returns:
true if the associated Command is supported by the specified target.
See Also:
Executable.isSupported(Element)

matchesStyle

protected boolean matchesStyle(com.google.gwt.dom.client.Node node)


Copyright © 2004-2008 XWiki. All Rights Reserved.