    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.

##

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

##

ROISettingPanel(ROI, Component)
  Create a ROISettingPanel.

##

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

##

roi

      protected ROI roi

  The ROI to be controlled by this ROISettingPanel.

roiMaster

      protected Component roiMaster

  The component to which roi associated.

showBox

      protected Checkbox showBox

  A Checkbox used to control and show roi's current visible state.

xField

      protected LabeledField xField

  LabeledField to set and show roi's current position, width, and height.

yField

      protected LabeledField yField

  LabeledField to set and show roi's current position, width, and height.

wField

      protected LabeledField wField

  LabeledField to set and show roi's current position, width, and height.

hField

      protected LabeledField hField

  LabeledField to set and show roi's current position, width, and height.

colorChoice

      protected Choice colorChoice

  Choice to set roi's Color

colorArray

      protected Color colorArray[]

tkScroll

      protected IntScrollPanel tkScroll

  An IntScrollPanel to control roi thickness

##

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.

##

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

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

getHfield

      public int getHfield()

  Get hField value which is meant to be the ROI's height.

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

getWfield

      public int getWfield()

  Get wField value which is meant to be the ROI's width.

getXfield

      public int getXfield()

  Get xField value which is meant to be the x coordinate of the ROI's base point.

getYfield

      public int getYfield()

  Get yField value which is meant to be the y coordinate of the ROI's base point.

handleEvent

      public boolean handleEvent(Event evt)

Overrides:
  handleEvent in class Component

repaintRoimaster

      public void repaintRoimaster()

  The roiMaster is updated by calling its repaint() method

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

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

setHfield

      public void setHfield(int h)

  Set hField value which is meant to be the ROI's height.
  Parameters:
    h - height of roi

setWfield

      public void setWfield(int w)

  Set wField value which is meant to be the ROI's width.
  Parameters:
    w - width of roi

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

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

setScroll

      public void setScroll(int t)

  Set tkScroll to be cursor's thickness.
  Parameters:
    t - thickness

setShowbox

      public void setShowbox(boolean b)

  Set showBox to be true or false

toggleShowbox

      public void toggleShowbox()

  toggle the showBow true, false state.

    All Packages  Class Hierarchy  This Package  Previous  Next  Index