Class VOIEvent

  • All Implemented Interfaces:
    java.io.Serializable

    public class VOIEvent
    extends java.util.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:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) 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.
      private static long serialVersionUID
      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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void finalize()
      cleanup.
      VOIBase getBase()
      returns the reference VOI.
      boolean getState()
      if the VOI were to have state, this would return it. currently returns true
      VOI getVOI()  
      • 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 Detail

      • serialVersionUID

        private static final long serialVersionUID
        Use serialVersionUID for interoperability.
        See Also:
        Constant Field Values
      • 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 Detail

      • 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 Detail

      • 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 java.lang.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()