com.levigo.util.swing.action
Class DummyCommand

java.lang.Object
  extended by com.levigo.util.swing.action.DummyCommand
All Implemented Interfaces:
Command

public class DummyCommand
extends Object
implements Command

A null command used to instantiate actions from the action factory when no command string for this action is provided in the properties file.


Constructor Summary
DummyCommand()
           
 
Method Summary
 boolean canExecute(Collection<Object> args)
          Permission checking for a command works as follows:
 void execute(Collection<Object> args)
          Execute the command.
 boolean isAvailable()
          Returns an indicator whether the command is available and therefore integrable.
 boolean isSelected(Collection<Object> args)
          Returns the selected state of this command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DummyCommand

public DummyCommand()
Method Detail

execute

public void execute(Collection<Object> args)
Description copied from interface: Command
Execute the command.

Specified by:
execute in interface Command
Parameters:
args - arguments for the command (contains all items for all actions inside of the context!)
See Also:
Command.execute(java.util.Collection)

canExecute

public boolean canExecute(Collection<Object> args)
Description copied from interface: Command
Permission checking for a command works as follows:

1. Check user privileges if the command is executable.
2. Ask if the command is executable with the given objects.

Specified by:
canExecute in interface Command
Parameters:
args - arguments for the command
Returns:
true - executable with these arguments,
false - impossible to execute this command with these arguments
See Also:
Command.canExecute(java.util.Collection)

isSelected

public boolean isSelected(Collection<Object> args)
Description copied from interface: Command
Returns the selected state of this command. This is typically used only for commands with a meaningful selection state.

Specified by:
isSelected in interface Command
Parameters:
args - arguments for the command
Returns:
true - selected with these arguments,
false - not selected with these arguments
See Also:
Command.isSelected(Collection)

isAvailable

public boolean isAvailable()
Description copied from interface: Command
Returns an indicator whether the command is available and therefore integrable.

Specified by:
isAvailable in interface Command
Returns:
true - available false - not available
See Also:
Command.isAvailable()


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.