com.xpn.xwiki.wysiwyg.client.ui.cmd
Interface CommandManager

All Superinterfaces:
SourcesCommandEvents
All Known Implementing Classes:
AbstractCommandManager, DefaultCommandManager

public interface CommandManager
extends SourcesCommandEvents


Method Summary
 boolean execute(Command cmd)
          Executes a command on the current document, current selection, or the given range.
 boolean execute(Command cmd, boolean param)
           
 boolean execute(Command cmd, int param)
           
 boolean execute(Command cmd, java.lang.String param)
          Executes a command on the current document, current selection, or the given range.
 java.lang.Boolean getBooleanValue(Command cmd)
           
 java.lang.Integer getIntegerValue(Command cmd)
           
 java.lang.String getStringValue(Command cmd)
          Returns the current value of the document, range, or current selection for the given command.
 boolean isEnabled(Command cmd)
          Returns a boolean value that indicates whether a specified command can be successfully executed using execute(Command, String), given the current state of the document.
 boolean isExecuted(Command cmd)
          Returns a boolean value that indicates the current state of the command.
 boolean isSupported(Command cmd)
          Returns a boolean value that indicates whether the current command is supported on the current range.
 
Methods inherited from interface com.xpn.xwiki.wysiwyg.client.ui.cmd.SourcesCommandEvents
addCommandListener, removeCommandListener
 

Method Detail

execute

boolean execute(Command cmd,
                java.lang.String param)
Executes a command on the current document, current selection, or the given range.

Parameters:
cmd - The command to execute.
param - Variant that specifies the string, number, or other value to assign. Possible values depend on the command.
Returns:
true if the command is successful.

execute

boolean execute(Command cmd,
                int param)
See Also:
execute(Command, String)

execute

boolean execute(Command cmd,
                boolean param)
See Also:
execute(Command, String)

execute

boolean execute(Command cmd)
Executes a command on the current document, current selection, or the given range.

Parameters:
cmd - The command to execute.
Returns:
true if the command is successful.

isEnabled

boolean isEnabled(Command cmd)
Returns a boolean value that indicates whether a specified command can be successfully executed using execute(Command, String), given the current state of the document.

Parameters:
cmd - The command to test.
Returns:
true if the command is enabled.

isExecuted

boolean isExecuted(Command cmd)
Returns a boolean value that indicates the current state of the command.

Parameters:
cmd - The command to test.
Returns:
true if the given command has been executed on the object.

isSupported

boolean isSupported(Command cmd)
Returns a boolean value that indicates whether the current command is supported on the current range.

Parameters:
cmd - The command to test
Returns:
true if the command is supported.

getStringValue

java.lang.String getStringValue(Command cmd)
Returns the current value of the document, range, or current selection for the given command.

Parameters:
cmd - The command to query.
Returns:
the command value for the document, range, or current selection, if supported. Possible values depend on the given command.

getIntegerValue

java.lang.Integer getIntegerValue(Command cmd)
See Also:
getStringValue(Command)

getBooleanValue

java.lang.Boolean getBooleanValue(Command cmd)
See Also:
getStringValue(Command)


Copyright © 2004-2008 XWiki. All Rights Reserved.