|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.refractions.udig.tools.edit.MutualExclusiveBehavior
public class MutualExclusiveBehavior
A Composite Mode (See GOF Composite Pattern) where contained modes are ordered by priority and only the mode with the highest priority and is valid for the current context is ran.
Constructor Summary | |
---|---|
MutualExclusiveBehavior()
Create an empty behaviour. |
|
MutualExclusiveBehavior(Behaviour behaviour)
|
|
MutualExclusiveBehavior(java.util.List<Behaviour> modes)
|
Method Summary | |
---|---|
java.util.List<Behaviour> |
getBehaviours()
|
UndoableMapCommand |
getCommand(EditToolHandler handler)
The action to be performed by this Behaviour. |
void |
handleError(EditToolHandler handler,
java.lang.Throwable error,
UndoableMapCommand command)
This method is called if an exception occurs during the execution of the run method. |
boolean |
isValid(EditToolHandler handler)
Called to determine whether this Behaviour is applicable and should be run. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MutualExclusiveBehavior(java.util.List<Behaviour> modes)
public MutualExclusiveBehavior(Behaviour behaviour)
behaviour
- public MutualExclusiveBehavior()
getBehaviours()
method
Method Detail |
---|
public boolean isValid(EditToolHandler handler)
Behaviour
isValid
in interface Behaviour
handler
- handler that calls this Behaviour
public UndoableMapCommand getCommand(EditToolHandler handler)
Behaviour
getCommand
in interface Behaviour
handler
- handler that calls this Behaviour
public void handleError(EditToolHandler handler, java.lang.Throwable error, UndoableMapCommand command)
Behaviour
This method should:
handleError
in interface Behaviour
error
- Error that occurredcommand
- Command retrieved from getCommandMethod. May be null if exception occurred while
executing getCommand();public java.lang.String toString()
toString
in class java.lang.Object
public java.util.List<Behaviour> getBehaviours()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |