fable.imageviewer.component
Class ImageComponentUI

java.lang.Object
  extended by fable.imageviewer.component.ImageComponentUI
All Implemented Interfaces:
IImagesVarKeys

public class ImageComponentUI
extends java.lang.Object
implements IImagesVarKeys

This class manages the SWT controls for the ImageView. It holds the imageCanvas, but does not manage things related to the imageCanvas. That is done in the ImageViewImage class.


Field Summary
static int DEFAULT_MARKER_SIZE
           
 
Fields inherited from interface fable.imageviewer.internal.IImagesVarKeys
BTN_IMG_ADD, BTN_IMG_ADD_PLOT, BTN_IMG_DELETE, BTN_IMG_SETTINGS, BTN_IMG_SUBTRACT, BTN_IMG_SUBTRACT_PLOT, COORD_BL, COORD_BR, COORD_CUSTOM, COORD_TL, COORD_TR, coordNameValues, O_MOOM, O_MOOP, O_OMMO, O_OMPO, O_OPMO, O_OPPO, O_POOM, O_POOP, orientNameValues, PALETTE_AUTUMN, PALETTE_BLUES, PALETTE_COLOR, PALETTE_GREENS, PALETTE_GREY, PALETTE_PASTEL1, PALETTE_RAINBOW1, PALETTE_RAINBOW2, PALETTE_REDS, PALETTE_SPRING, PALETTE_SUMMER, PALETTE_WINTER, paletteNameValues
 
Constructor Summary
ImageComponentUI(ImageComponent imageView)
          Constructor.
 
Method Summary
 void createControls(org.eclipse.swt.widgets.Composite parent)
          Creates all the controls.
 void createFileNumberText()
          Create file number text.
 void dispose()
           
 void firePeaksUpate()
           
 boolean getControlCompositeShowing()
           
 ImageComponentImage getImage()
           
 org.eclipse.swt.widgets.Canvas getImageCanvas()
           
 float[] getMinMaxText()
          Gets the current values of minimumText and maximumText.
 void resetAutoscale()
          Does the logic for changing any of the autoscale parameters.
 void setAspectSelection(boolean isChecked)
           
 void setAutoScale(boolean autoScale)
           
 void setControlCompositeShowing(boolean controlCompositeShowing)
           
 void setCoordinate(int index)
           
 void setFileNumberText(java.lang.String text)
          Sets the text for the fileNumberText.
 void setFocus()
           
 void setImage(ImageComponentImage image)
           
 void setImageScheme(int index)
           
 void setMinMaxText(float[] minmax)
          Sets minimumText and maximumText to the given values.
 void setOrientation(int index)
           
 void setPeaks(boolean peaksOn)
           
 void setStatusLabel(org.eclipse.swt.widgets.Text statusLabel)
           
 void setStatusText(java.lang.String text)
           
 void setTitle(java.lang.String title)
           
 void setUserMaximumText(java.lang.String text)
           
 void setUserMinimumText(java.lang.String text)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_MARKER_SIZE

public static final int DEFAULT_MARKER_SIZE
See Also:
Constant Field Values
Constructor Detail

ImageComponentUI

public ImageComponentUI(ImageComponent imageView)
Constructor.

Parameters:
imageView -
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

createControls

public void createControls(org.eclipse.swt.widgets.Composite parent)
Creates all the controls.

Parameters:
parent -

setTitle

public void setTitle(java.lang.String title)

dispose

public void dispose()

resetAutoscale

public void resetAutoscale()
Does the logic for changing any of the autoscale parameters. Does not cause the image to be redrawn.


createFileNumberText

public void createFileNumberText()
Create file number text. Should only be created on the main image view. TODO: currently this method is not being called, still have to find the best way to call it ...


setFileNumberText

public void setFileNumberText(java.lang.String text)
Sets the text for the fileNumberText.

Parameters:
text -

setMinMaxText

public void setMinMaxText(float[] minmax)
Sets minimumText and maximumText to the given values. If the input is Statistics in the form float[] {min, max, mean}, the mean is ignored. Does not cause the image to be redisplayed.

Parameters:
minmax - The new values as float[] {min, max}.

getMinMaxText

public float[] getMinMaxText()
Gets the current values of minimumText and maximumText.

Returns:
The current values of minimumText and maximumText.

setStatusText

public void setStatusText(java.lang.String text)

getImageCanvas

public org.eclipse.swt.widgets.Canvas getImageCanvas()
Returns:
the imageCanvas

getImage

public ImageComponentImage getImage()
Returns:
the image

setImage

public void setImage(ImageComponentImage image)
Parameters:
image - the image to set

getControlCompositeShowing

public boolean getControlCompositeShowing()
Returns:
the controlCompositeShowing

setControlCompositeShowing

public void setControlCompositeShowing(boolean controlCompositeShowing)
Parameters:
controlCompositeShowing - the controlCompositeShowing to set

setFocus

public void setFocus()

setAspectSelection

public void setAspectSelection(boolean isChecked)

firePeaksUpate

public void firePeaksUpate()

setCoordinate

public void setCoordinate(int index)

setOrientation

public void setOrientation(int index)

setImageScheme

public void setImageScheme(int index)

setAutoScale

public void setAutoScale(boolean autoScale)

setPeaks

public void setPeaks(boolean peaksOn)

setUserMinimumText

public void setUserMinimumText(java.lang.String text)

setUserMaximumText

public void setUserMaximumText(java.lang.String text)

setStatusLabel

public void setStatusLabel(org.eclipse.swt.widgets.Text statusLabel)