com.vistech.roi
Class ShapeEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--com.vistech.roi.ShapeEvent
All Implemented Interfaces:
java.io.Serializable

public class ShapeEvent
extends java.util.EventObject
implements java.io.Serializable

An event-state class that carries the Shape object. The ShapeEvent object is sent to when a shapeEvent occurs. The receiving object extracts the Shape from the ShapeEvent object.

Version:
1.0 21 Nov 1999
Author:
Lawrence Rodrigues
See Also:
Serialized Form

Field Summary
protected  int command
           
protected  java.awt.Shape shape
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ShapeEvent(java.lang.Object src, java.awt.Shape sh)
          The ShapeEvent contsructor.
 
Method Summary
 int getCommand()
          Returns the command.
 java.awt.Shape getShape()
          Returns the Shape object.
 void setCommand(int command)
          Sets the command that caused the shape event to get fired.
 
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
 

Field Detail

shape

protected java.awt.Shape shape

command

protected int command
Constructor Detail

ShapeEvent

public ShapeEvent(java.lang.Object src,
                  java.awt.Shape sh)
The ShapeEvent contsructor.
Parameters:
src - the source object where the shape originated.
sh - the shape.
Method Detail

getShape

public java.awt.Shape getShape()
Returns the Shape object.
Returns:
the shape.

setCommand

public void setCommand(int command)
Sets the command that caused the shape event to get fired.
Parameters:
command - the type of command.
See Also:
com.vistech.roi.ShapeMarker.

getCommand

public int getCommand()
Returns the command. Shape events are fired as a result of executing certain commands. For example, "Draw", "Move", "Paste". The recepients of the shape events may need the command that was the cause of the shape event.
Returns:
the command that created the shape.