Package org.eclipse.gef.commands
Class CommandStackEvent
java.lang.Object
java.util.EventObject
org.eclipse.gef.commands.CommandStackEvent
- All Implemented Interfaces:
- Serializable
Instances of this class are sent whenever stack events occur. The type of
 event can be determined by calling 
getDetail(), and comparing the
 return value to constants defined by CommandStack.
 Warning: this class is not intended to be subclassed.
- Since:
- 3.1
- See Also:
- 
Field SummaryFields inherited from class java.util.EventObjectsource
- 
Constructor SummaryConstructorsConstructorDescriptionCommandStackEvent(CommandStack stack, Command c, int detail) Constructs a new event instance.
- 
Method SummaryModifier and TypeMethodDescriptionReturnsnullor a Command if a command is relevant to the current event.intReturns an integer identifying the type of event which has occurred.final booleanReturnstrueif this event is fired after the stack having changed.final booleanReturnstrueif this event is fired prior to the stack changing.Methods inherited from class java.util.EventObjectgetSource, toString
- 
Constructor Details- 
CommandStackEventConstructs a new event instance. The stack specifies the source of the event. If a command is relevant to the event context, one should be specified. The detail indicates the type of event occurring.- Parameters:
- stack- the command stack
- c- a command or- null
- detail- an integer identifier
- Since:
- 3.1
 
 
- 
- 
Method Details- 
getCommandReturnsnullor a Command if a command is relevant to the current event.- Returns:
- nullor a command
- Since:
- 3.1
 
- 
isPreChangeEventpublic final boolean isPreChangeEvent()Returnstrueif this event is fired prior to the stack changing.- Returns:
- trueif pre-change event
- Since:
- 3.2
 
- 
isPostChangeEventpublic final boolean isPostChangeEvent()Returnstrueif this event is fired after the stack having changed.- Returns:
- trueif post-change event
- Since:
- 3.2
 
- 
getDetailpublic int getDetail()Returns an integer identifying the type of event which has occurred.- Returns:
- the detail of the event
- Since:
- 3.1
 
 
-