Class VOIEvent

java.lang.Object
java.util.EventObject
gov.nih.mipav.model.structures.event.VOIEvent
All Implemented Interfaces:
Serializable

public class VOIEvent extends EventObject
An event from a VOI. Registers the VOI as the event source and, if needed, the VOIBase that changed within the VOI.

It might be useful to have several different listeners VOI objects, to listen for different varieties of VOI changes, say, for curve-changing, or property-changing.

Perhaps in this case, the VOIListener could listen for all those, but most objects interested in the VOI, would only listen for particular changes in the VOI.

Version:
Aug 2002
Author:
David Parsons, Paul F. Hemler

$Logfile: /mipav/src/gov/nih/mipav/model/structures/event/VOIEvent.java $ $Revision: 2 $ $Date: 04-11-23 1:28p $

See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) VOIBase
    holds reference because referring to a VOI held by the ViewVOIVector would cause all kinds of memory clean-up concerns. may be null.
    private static final long
    Use serialVersionUID for interoperability.

    Fields inherited from class java.util.EventObject

    source
  • Constructor Summary

    Constructors
    Constructor
    Description
    VOIEvent(VOI eventSource)
    creates an event with no VOI as reference.
    VOIEvent(VOI eventSource, VOIBase changedCurve)
    creates an event using the supplied VOI as reference.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    cleanup.
    returns the reference VOI.
    boolean
    if the VOI were to have state, this would return it. currently returns true
     

    Methods inherited from class java.util.EventObject

    getSource, toString

    Methods inherited from class java.lang.Object

    clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Use serialVersionUID for interoperability.
      See Also:
    • mostRecentUpdate

      VOIBase mostRecentUpdate
      holds reference because referring to a VOI held by the ViewVOIVector would cause all kinds of memory clean-up concerns. may be null.
  • Constructor Details

    • VOIEvent

      public VOIEvent(VOI eventSource)
      creates an event with no VOI as reference.
      Parameters:
      eventSource - DOCUMENT ME!
    • VOIEvent

      public VOIEvent(VOI eventSource, VOIBase changedCurve)
      creates an event using the supplied VOI as reference.
      Parameters:
      eventSource - DOCUMENT ME!
      changedCurve - DOCUMENT ME!
  • Method Details

    • finalize

      public void finalize()
      cleanup. Sets the reference VOIBase to null, to prevent memory errors when the VOIBase itself is through.
      Overrides:
      finalize in class Object
    • getBase

      public VOIBase getBase()
      returns the reference VOI. May be null
      Returns:
      DOCUMENT ME!
    • getState

      public boolean getState()
      if the VOI were to have state, this would return it. currently returns true
      Returns:
      DOCUMENT ME!
    • getVOI

      public VOI getVOI()