uk.ac.starlink.diva
Class FigureChangedEvent

java.lang.Object
  extended by java.util.EventObject
      extended by uk.ac.starlink.diva.FigureChangedEvent
All Implemented Interfaces:
Serializable

public class FigureChangedEvent
extends EventObject

FigureChangedEvent defines an event that describes a change to a figure drawn on a Draw instance.

Version:
$Id$
Author:
Peter W. Draper
See Also:
Serialized Form

Field Summary
static int CHANGED
          Used when figure is changed (transformed).
static int CREATED
          Used when a figure is created.
protected  LayerEvent layerEvent
          The LayerEvent associated with the change to the Figure.
static int REMOVED
          Used when a figure is removed.
protected  int type
          The type of event.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
FigureChangedEvent(Object source, int type)
          Constructs a FigureChangedEvent object, suitable when no LayerEvent is associated.
FigureChangedEvent(Object source, int type, LayerEvent le)
          Constructs a FigureChangedEvent object.
 
Method Summary
 LayerEvent getLayerEvent()
          Return the LayerEvent that was associated with the change.
 int getType()
          Return type of event.
 
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

CREATED

public static final int CREATED
Used when a figure is created.

See Also:
Constant Field Values

REMOVED

public static final int REMOVED
Used when a figure is removed.

See Also:
Constant Field Values

CHANGED

public static final int CHANGED
Used when figure is changed (transformed).

See Also:
Constant Field Values

type

protected int type
The type of event.


layerEvent

protected LayerEvent layerEvent
The LayerEvent associated with the change to the Figure.

Constructor Detail

FigureChangedEvent

public FigureChangedEvent(Object source,
                          int type,
                          LayerEvent le)
Constructs a FigureChangedEvent object.

Parameters:
source - the source Figure.
type - an int specifying CREATED, REMOVED or CHANGED.
le - the LayerEvent associated with the Figure change.

FigureChangedEvent

public FigureChangedEvent(Object source,
                          int type)
Constructs a FigureChangedEvent object, suitable when no LayerEvent is associated.

Parameters:
source - the source Figure.
type - an int specifying CREATED, REMOVED or CHANGED.
Method Detail

getType

public int getType()
Return type of event.


getLayerEvent

public LayerEvent getLayerEvent()
Return the LayerEvent that was associated with the change.



Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.