visad.bio
Class MeasurePool

java.lang.Object
  extended by visad.bio.MeasurePool
All Implemented Interfaces:
java.util.EventListener, DisplayListener

public class MeasurePool
extends java.lang.Object
implements DisplayListener

MeasurePool maintains a pool of manipulable points and a set of connecting lines, for interactive data measurement in the given display.


Constructor Summary
MeasurePool(VisBio biovis, DisplayImpl display, int dimension)
          Constructs a pool of measurements.
 
Method Summary
 void displayChanged(DisplayEvent e)
          Listens for mouse events in the display.
 int getDimension()
          Gets the display's dimensionality.
 MeasureThing[] getSelection()
          Gets the list of selected measurements in array form.
 java.awt.Color getSelectionColor()
          Gets the color corresponding to the current selection.
 MeasureGroup getSelectionGroup()
          Gets the group corresponding to the current selection.
 int getSlice()
          Gets the current image slice value.
 boolean hasSelection()
          Gets whether the measurement pool has any selected measurements.
 boolean hasSingleSelection()
          Gets whether the measurement pool has a single selected measurement.
 void init()
          Adds references to the associated display.
 boolean isSelectionStandard()
          Gets whether all measurements in the current selection are standard.
 PoolPoint lease(MeasurePoint point)
          Grants the given endpoint use of a pool point.
 void refresh(boolean reconstruct)
          Refreshes the measurement endpoints in the pool.
 void release(MeasurePoint point)
          Returns the given endpoint's pool point to the measurement pool.
 void releaseAll()
          Returns all pool points to the measurement pool.
 void set(MeasureList list)
          Creates measurement pool objects to match the given measurements.
 void setSlice(int slice)
          Sets the current image slice value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MeasurePool

public MeasurePool(VisBio biovis,
                   DisplayImpl display,
                   int dimension)
Constructs a pool of measurements.

Method Detail

init

public void init()
          throws VisADException,
                 java.rmi.RemoteException
Adds references to the associated display.

Throws:
VisADException
java.rmi.RemoteException

lease

public PoolPoint lease(MeasurePoint point)
Grants the given endpoint use of a pool point.


release

public void release(MeasurePoint point)
Returns the given endpoint's pool point to the measurement pool.


releaseAll

public void releaseAll()
Returns all pool points to the measurement pool.


set

public void set(MeasureList list)
Creates measurement pool objects to match the given measurements.


setSlice

public void setSlice(int slice)
Sets the current image slice value.


refresh

public void refresh(boolean reconstruct)
Refreshes the measurement endpoints in the pool.


getSlice

public int getSlice()
Gets the current image slice value.


getDimension

public int getDimension()
Gets the display's dimensionality.


hasSelection

public boolean hasSelection()
Gets whether the measurement pool has any selected measurements.


hasSingleSelection

public boolean hasSingleSelection()
Gets whether the measurement pool has a single selected measurement.


getSelection

public MeasureThing[] getSelection()
Gets the list of selected measurements in array form.


isSelectionStandard

public boolean isSelectionStandard()
Gets whether all measurements in the current selection are standard.


getSelectionColor

public java.awt.Color getSelectionColor()
Gets the color corresponding to the current selection. If the selection consists of more than one color, the first color is returned.


getSelectionGroup

public MeasureGroup getSelectionGroup()
Gets the group corresponding to the current selection. If the selection consists of more than one group, the first group is returned.


displayChanged

public void displayChanged(DisplayEvent e)
Listens for mouse events in the display.

Specified by:
displayChanged in interface DisplayListener