Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse GEF
3.3

org.eclipse.gef.commands
Class CommandStackEvent

java.lang.Object
  extended byjava.util.EventObject
      extended by
org.eclipse.gef.commands.CommandStackEvent
All Implemented Interfaces:
java.io.Serializable

public class CommandStackEvent
extends java.util.EventObject

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:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
CommandStackEvent ( CommandStack stack, Command c, int detail)
          Constructs a new event instance.
 
Method Summary
  Command getCommand ()
          Returns null or a Command if a command is relevant to the current event.
 int getDetail ()
          Returns an integer identifying the type of event which has occurred.
 boolean isPostChangeEvent ()
          Returns true if this event is fired after the stack having changed.
 boolean isPreChangeEvent ()
          Returns true if this event is fired prior to the stack changing.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CommandStackEvent

public CommandStackEvent(
CommandStack stack,
                         
Command c,
                         int detail)
Constructs 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 Detail

getCommand

public 
Command getCommand()
Returns null or a Command if a command is relevant to the current event.

Returns:
null or a command
Since:
3.1

isPreChangeEvent

public final boolean isPreChangeEvent()
Returns true if this event is fired prior to the stack changing.

Returns:
true if pre-change event
Since:
3.2

isPostChangeEvent

public final boolean isPostChangeEvent()
Returns true if this event is fired after the stack having changed.

Returns:
true if post-change event
Since:
3.2

getDetail

public int getDetail()
Returns an integer identifying the type of event which has occurred.

Returns:
the detail of the event
Since:
3.1

Eclipse GEF
3.3

Copyright (c) IBM Corp. and others 2000, 2007. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire