motris.gui
Class ImageView

java.lang.Object
  extended bymotris.gui.ImageView
All Implemented Interfaces:
ImageSequenceData.TimeChangedListener, Layer, ParameterizedObject, ParameterizedObject.ParameterChangedListener

public class ImageView
extends java.lang.Object
implements Layer, ParameterizedObject.ParameterChangedListener, ImageSequenceData.TimeChangedListener

Display Layer showing the Background Layer

Author:
ottlik

Nested Class Summary
 
Nested classes inherited from class parameter.ParameterizedObject
ParameterizedObject.ParameterChangedListener, ParameterizedObject.ParameterizedObjectManager
 
Field Summary
private  ExperimentViewController controller
           
private  DataManager dataManager
           
private  java.awt.image.BufferedImage picture
           
(package private)  int time
           
 
Constructor Summary
ImageView(DataManager _data, ExperimentViewController _controller)
           
 
Method Summary
 boolean addParameterChangedListener(ParameterizedObject.ParameterChangedListener l)
          Register dependent component that wants to be notified if this object changes parameters
 void draw(java.awt.Graphics g, javax.swing.JPanel _c, double zoomFactor)
           
 java.lang.String getDisplayedName()
           
 java.lang.String getIdentification()
           
 ParameterSet getParameters()
          Get a Vector of Strings with a description of each Parameter
 ParameterSet getPixelDetails(Double2Vector position)
          Get Detailed information (read-only) for pixel
 java.awt.Dimension getPreferedDimension(int currentTime)
           
 void parameterChanged(ParameterizedObject source)
           
 boolean parameterEdited(ParameterSet editedParams)
          Notify when Parameter set was changed during edit
 boolean removeParameterChangedListener(ParameterizedObject.ParameterChangedListener l)
          un-register dependent object
 void setImage(int _time)
           
 boolean setParameters(ParameterSet _params)
          Set Parameters of this class
 void timeChanged(int oldTime, int newTime)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

picture

private java.awt.image.BufferedImage picture

dataManager

private DataManager dataManager

controller

private ExperimentViewController controller

time

int time
Constructor Detail

ImageView

public ImageView(DataManager _data,
                 ExperimentViewController _controller)
Method Detail

draw

public void draw(java.awt.Graphics g,
                 javax.swing.JPanel _c,
                 double zoomFactor)
Specified by:
draw in interface Layer

setImage

public void setImage(int _time)

getDisplayedName

public java.lang.String getDisplayedName()
Specified by:
getDisplayedName in interface Layer

getIdentification

public java.lang.String getIdentification()
Specified by:
getIdentification in interface Layer

getPreferedDimension

public java.awt.Dimension getPreferedDimension(int currentTime)
Specified by:
getPreferedDimension in interface Layer

getParameters

public ParameterSet getParameters()
Description copied from interface: ParameterizedObject
Get a Vector of Strings with a description of each Parameter

Specified by:
getParameters in interface ParameterizedObject
Returns:
Vector[Parameter]

setParameters

public boolean setParameters(ParameterSet _params)
Description copied from interface: ParameterizedObject
Set Parameters of this class

Specified by:
setParameters in interface ParameterizedObject

parameterEdited

public boolean parameterEdited(ParameterSet editedParams)
Description copied from interface: ParameterizedObject
Notify when Parameter set was changed during edit

Specified by:
parameterEdited in interface ParameterizedObject

addParameterChangedListener

public boolean addParameterChangedListener(ParameterizedObject.ParameterChangedListener l)
Description copied from interface: ParameterizedObject
Register dependent component that wants to be notified if this object changes parameters

Specified by:
addParameterChangedListener in interface ParameterizedObject
Parameters:
l -
Returns:
false if Notify Capability was not implemented by this object, otherwise true

removeParameterChangedListener

public boolean removeParameterChangedListener(ParameterizedObject.ParameterChangedListener l)
Description copied from interface: ParameterizedObject
un-register dependent object

Specified by:
removeParameterChangedListener in interface ParameterizedObject
Parameters:
l -
Returns:
false if object was not registered or if notify capability is not implemented by this object

parameterChanged

public void parameterChanged(ParameterizedObject source)
Specified by:
parameterChanged in interface ParameterizedObject.ParameterChangedListener

timeChanged

public void timeChanged(int oldTime,
                        int newTime)
Specified by:
timeChanged in interface ImageSequenceData.TimeChangedListener

getPixelDetails

public ParameterSet getPixelDetails(Double2Vector position)
Description copied from interface: Layer
Get Detailed information (read-only) for pixel

Specified by:
getPixelDetails in interface Layer
Parameters:
position - in image coordinates
Returns:
ParameterSet to be displayed