uk.ac.essex.ia.imageview.pane
Class ImageViewerState

java.lang.Object
  extended by uk.ac.essex.ia.imageview.pane.ImageViewerState
All Implemented Interfaces:
java.awt.event.ActionListener, java.beans.PropertyChangeListener, java.util.EventListener, javax.swing.event.ChangeListener, ImageViewerConstants

public class ImageViewerState
extends java.lang.Object
implements java.awt.event.ActionListener, javax.swing.event.ChangeListener, ImageViewerConstants, java.beans.PropertyChangeListener

The event processing center for this application. This class responses for loading data sets, processing the events from the utility menu that includes changing the operation scope, the layout, window/level, rotation angle, zoom factor, starting/stoping the cining-loop and etc. TODO:


Field Summary
 
Fields inherited from interface uk.ac.essex.ia.imageview.ImageViewerConstants
allViewsCommand, annotationCommand, currentViewCommand, defaultLevel, defaultWindow, histogramCommand, largestLevel, largestWindow, levelCommand, measurementCommand, nozoom, paramSync, RESOURCE_BASE_NAME, rotationCommand, setLayoutCommand, smallestLevel, smallestWindow, speedCommand, startCommand, statisticsCommand, stopCommand, windowCommand, zoomCommand
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent evt)
          process the action events.
 void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
          Add a property change listener.
 java.awt.image.RenderedImage getImageForFocusPane()
          Create the wrapped image for the focused pane.
static ImageViewerState getInstance()
          Return the single instance of this class.
 void propertyChange(java.beans.PropertyChangeEvent evt)
          Process the property change event.
 void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
          Remove a property change listener.
 void stateChanged(javax.swing.event.ChangeEvent evt)
          Process the state change events.
 void updateSliders()
          Update the slider marks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ImageViewerState getInstance()
Return the single instance of this class. This method guarantees the singleton property of this class.


addPropertyChangeListener

public void addPropertyChangeListener(java.lang.String propertyName,
                                      java.beans.PropertyChangeListener listener)
Add a property change listener.


removePropertyChangeListener

public void removePropertyChangeListener(java.lang.String propertyName,
                                         java.beans.PropertyChangeListener listener)
Remove a property change listener.


updateSliders

public void updateSliders()
Update the slider marks.


getImageForFocusPane

public java.awt.image.RenderedImage getImageForFocusPane()
Create the wrapped image for the focused pane.


actionPerformed

public void actionPerformed(java.awt.event.ActionEvent evt)
process the action events.

Specified by:
actionPerformed in interface java.awt.event.ActionListener

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent evt)
Process the state change events.

Specified by:
stateChanged in interface javax.swing.event.ChangeListener

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent evt)
Process the property change event. This is used to synchronize the sliders on the display when the focus is changed.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener