Class ncsa.horizon.awt.ROISettingPanel
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ncsa.horizon.awt.ROISettingPanel

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----ncsa.horizon.awt.ROISettingPanel

public class ROISettingPanel
extends Panel
This class provide a graphic interface to control the ncsa.horizon.awt.ROI. It is implemented as a panel with Checkbox, ncsa.horizon.awt.LabeledFields, Choices, and ncsa.horizon.awt.IntScrollPanels to make ROI visible or invisible, set ROI color, position, width, height, and thickness. The panel will update its position, width, height text field, and visibility CheckBox as ROI changes position and becomes visible or invisible.

Variable Index

 o colorArray
 o colorChoice
Choice to set roi's Color
 o hField
LabeledField to set and show roi's current position, width, and height.
 o roi
The ROI to be controlled by this ROISettingPanel.
 o roiMaster
The component to which roi associated.
 o showBox
A Checkbox used to control and show roi's current visible state.
 o tkScroll
An IntScrollPanel to control roi thickness
 o wField
LabeledField to set and show roi's current position, width, and height.
 o xField
LabeledField to set and show roi's current position, width, and height.
 o yField
LabeledField to set and show roi's current position, width, and height.

Constructor Index

 o ROISettingPanel(ROI, Component)
Create a ROISettingPanel.

Method Index

 o action(Event, Object)
Handle applet GUI actions.
 o getColorchoice()
Get the Color from colorChoice's current value.
 o getHfield()
Get hField value which is meant to be the ROI's height.
 o getShowbox()
Get the showBox's current state, it represents the visibility of the ROI
 o getWfield()
Get wField value which is meant to be the ROI's width.
 o getXfield()
Get xField value which is meant to be the x coordinate of the ROI's base point.
 o getYfield()
Get yField value which is meant to be the y coordinate of the ROI's base point.
 o handleEvent(Event)
 o repaintRoimaster()
The roiMaster is updated by calling its repaint() method
 o setColorchoice(Color)
Set a Color to colorChoice's current value
 o setFields(int, int, int, int)
Set xField, yField, wField, and hField with roi's current position, width, and height.
 o setHfield(int)
Set hField value which is meant to be the ROI's height.
 o setScroll(int)
Set tkScroll to be cursor's thickness.
 o setShowbox(boolean)
Set showBox to be true or false
 o setWfield(int)
Set wField value which is meant to be the ROI's width.
 o setXfield(int)
Set xField value which is meant to be the x coordinate of the ROI's base point.
 o setYfield(int)
Set yField value which is meant to be the y coordinate of the ROI's base point.
 o toggleShowbox()
toggle the showBow true, false state.

Variables

 o roi
  protected ROI roi
The ROI to be controlled by this ROISettingPanel.
 o roiMaster
  protected Component roiMaster
The component to which roi associated.
 o showBox
  protected Checkbox showBox
A Checkbox used to control and show roi's current visible state.
 o xField
  protected LabeledField xField
LabeledField to set and show roi's current position, width, and height.
 o yField
  protected LabeledField yField
LabeledField to set and show roi's current position, width, and height.
 o wField
  protected LabeledField wField
LabeledField to set and show roi's current position, width, and height.
 o hField
  protected LabeledField hField
LabeledField to set and show roi's current position, width, and height.
 o colorChoice
  protected Choice colorChoice
Choice to set roi's Color
 o colorArray
  protected Color colorArray[]
 o tkScroll
  protected IntScrollPanel tkScroll
An IntScrollPanel to control roi thickness

Constructors

 o ROISettingPanel
  public ROISettingPanel(ROI roi,
                         Component c)
Create a ROISettingPanel.
Parameters:
cursor - The ROI to be controlled by this ROISettingPanel.
c - The Component to which the cursor is associated.

Methods

 o action
  public boolean action(Event ev,
                        Object obj)
Handle applet GUI actions. This responds to user input/selection using the GUI controls.
Parameters:
ev - The Event to handle.
obj - AN Event-specific object.
Returns:
false.
Overrides:
action in class Component
 o getColorchoice
  public Color getColorchoice()
Get the Color from colorChoice's current value.
Returns:
The colorChoice's current value which is meant to be the ROI's color
 o getHfield
  public int getHfield()
Get hField value which is meant to be the ROI's height.
 o getShowbox
  public boolean getShowbox()
Get the showBox's current state, it represents the visibility of the ROI
Returns:
true if the ROI is visible, false if the ROI is hiden
 o getWfield
  public int getWfield()
Get wField value which is meant to be the ROI's width.
 o getXfield
  public int getXfield()
Get xField value which is meant to be the x coordinate of the ROI's base point.
 o getYfield
  public int getYfield()
Get yField value which is meant to be the y coordinate of the ROI's base point.
 o handleEvent
  public boolean handleEvent(Event evt)
Overrides:
handleEvent in class Component
 o repaintRoimaster
  public void repaintRoimaster()
The roiMaster is updated by calling its repaint() method
 o setColorchoice
  public void setColorchoice(Color color)
Set a Color to colorChoice's current value
Parameters:
color - Following value acceptable:(default Color.red) Color.red, Color.green, Color.blue, Color.cyan, Color.magenta, Color.yellow, Color.black, Color.white, Color.gray
 o setFields
  public void setFields(int x,
                        int y,
                        int w,
                        int h)
Set xField, yField, wField, and hField with roi's current position, width, and height.
Parameters:
x - x coordinate of base point of current ROI with respect to the left top of roiMaster
y - y coordinate of base point of current ROI with respect to the left top of roiMaster
w - width of roi
h - height of roi
 o setHfield
  public void setHfield(int h)
Set hField value which is meant to be the ROI's height.
Parameters:
h - height of roi
 o setWfield
  public void setWfield(int w)
Set wField value which is meant to be the ROI's width.
Parameters:
w - width of roi
 o setXfield
  public void setXfield(int x)
Set xField value which is meant to be the x coordinate of the ROI's base point.
Parameters:
x - x coordinate of base point of current ROI with respect to the left top of roiMaster
 o setYfield
  public void setYfield(int y)
Set yField value which is meant to be the y coordinate of the ROI's base point.
Parameters:
y - y coordinate of base point of current ROI with respect to the left top of roiMaster
 o setScroll
  public void setScroll(int t)
Set tkScroll to be cursor's thickness.
Parameters:
t - thickness
 o setShowbox
  public void setShowbox(boolean b)
Set showBox to be true or false
 o toggleShowbox
  public void toggleShowbox()
toggle the showBow true, false state.

All Packages  Class Hierarchy  This Package  Previous  Next  Index