All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface uhr.core.role.StateCommand

public interface StateCommand
A StateCommand is a command supported by a StateCommandable.. The properties apply at the current point in time. It is specifically designed to make a part command context menu as easy as Duck Soup. :-)

The implementation should set the name and isPropogated in the constructor, since they are immutable.


Method Index

 o getName()
The command name.
 o isAllowable()
Determines whether the command is allowed now or not.
 o isDefault()
Determines whether the command is the default command for the current state.
 o isPropogated()
Determines whether the command will be "propogated" to child parts or not.
 o setAllowable(boolean)
Sets whether the command is allowed now or not, according to the state transition table.
 o setDefault(boolean)
Sets whether the command is the default command for the current state.

Methods

 o getName
 public abstract String getName()
The command name. This never changes.

Returns:
the command name.
 o isPropogated
 public abstract boolean isPropogated()
Determines whether the command will be "propogated" to child parts or not. This applies only to containers. For example a Close command would be propogated to all child parts having the Close command, so that and entire branch can be closed correctly and in a resuable manner.

Returns:
true if propogated, false if not.
 o setAllowable
 public abstract void setAllowable(boolean isAllowable)
Sets whether the command is allowed now or not, according to the state transition table. If allowed it may be called now. This can be used for enabling or disabling this command on a context menu. The default is false.

Parameters:
isAllowable - true if allowable now, false if not.
 o isAllowable
 public abstract boolean isAllowable()
Determines whether the command is allowed now or not.

Returns:
true if allowable now, false if not.
 o setDefault
 public abstract void setDefault(boolean isDefault)
Sets whether the command is the default command for the current state. Only one command is the default command at any one time. This can be used for bolding the default command in the context menu. The default is false.

Parameters:
isDefault - true if is the default command, false if not.
 o isDefault
 public abstract boolean isDefault()
Determines whether the command is the default command for the current state.

Returns:
true if is the default command, false if not.

All Packages  Class Hierarchy  This Package  Previous  Next  Index