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

Class ncsa.horizon.awt.LineSelectionSettingPanel

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

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

Variable Index

 o colorArray
 o colorChoice
Choice to set ls's Color
 o delta_xField
LabeledField to set and show ls's current position, width, and height.
 o delta_yField
LabeledField to set and show ls's current position, width, and height.
 o ls
The LineSelection to be controlled by this LineSelectionSettingPanel.
 o lsMaster
The component to which ls associated.
 o showBox
A Checkbox used to control and show ls's current visible state.
 o tkScroll
An IntScrollPanel to control ls thickness
 o xField
LabeledField to set and show ls's current position, width, and height.
 o yField
LabeledField to set and show ls's current position, width, and height.

Constructor Index

 o LineSelectionSettingPanel(LineSelection, Component)
Create a LineSelectionSettingPanel.

Method Index

 o action(Event, Object)
Handle applet GUI actions.
 o getColorchoice()
Get the Color from colorChoice's current value
 o getDelta_xfield()
Get delta_xField value which is meant to be the LineSelection's x component.
 o getDelta_yfield()
Get delta_yField value which is meant to be the LineSelection's y component.
 o getShowbox()
Get the showBox's current state, it represents the visibility of the LineSelection.
 o getXfield()
Get xField value which is meant to be the x coordinate of the LineSelection's start point.
 o getYfield()
Get yField value which is meant to be the y coordinate of the LineSelection's start point.
 o handleEvent(Event)
 o repaintLsmaster()
The lsMaster is updated by calling its repaint() method
 o setColorchoice(Color)
Set a Color to colorChoice's current value
 o setDelta_xfield(int)
Set delta_xField which is meant to be the LineSelection's x component.
 o setDelta_yfield(int)
Set delta_yField which is meant to be the LineSelection's y component.
 o setFields(int, int, int, int)
Set xField, yField, delta_xField, and delta_xField which are meant to be the LineSelection's start point, x component, and y component.
 o setScroll(int)
Set tkScroll to be LineSelection's thickness.
 o setShowbox(boolean)
Set showBox to be true or false
 o setXfield(int)
Set xField value which is meant to be the x coordinate of the LineSelection's start point.
 o setYfield(int)
Set yField value which is meant to be the y coordinate of the LineSelection's start point.
 o toggleShowbox()
toggle the showBow true, false state.

Variables

 o ls
  protected LineSelection ls
The LineSelection to be controlled by this LineSelectionSettingPanel.
 o lsMaster
  protected Component lsMaster
The component to which ls associated.
 o showBox
  protected Checkbox showBox
A Checkbox used to control and show ls's current visible state.
 o xField
  protected LabeledField xField
LabeledField to set and show ls's current position, width, and height.
 o yField
  protected LabeledField yField
LabeledField to set and show ls's current position, width, and height.
 o delta_xField
  protected LabeledField delta_xField
LabeledField to set and show ls's current position, width, and height.
 o delta_yField
  protected LabeledField delta_yField
LabeledField to set and show ls's current position, width, and height.
 o colorChoice
  protected Choice colorChoice
Choice to set ls's Color
 o colorArray
  protected Color colorArray[]
 o tkScroll
  protected IntScrollPanel tkScroll
An IntScrollPanel to control ls thickness

Constructors

 o LineSelectionSettingPanel
  public LineSelectionSettingPanel(LineSelection ls,
                                   Component c)
Create a LineSelectionSettingPanel.
Parameters:
cursor - The LineSelection to be controlled by this LineSelectionSettingPanel.
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 current Color of colorChoice which is LineSelection's drawing color
 o getDelta_xfield
  public int getDelta_xfield()
Get delta_xField value which is meant to be the LineSelection's x component.
Returns:
current value of delta_xField
 o getDelta_yfield
  public int getDelta_yfield()
Get delta_yField value which is meant to be the LineSelection's y component.
Returns:
current value of delta_yField
 o getShowbox
  public boolean getShowbox()
Get the showBox's current state, it represents the visibility of the LineSelection.
Returns:
true if the LineSelection is visible, false if the LineSelection is hiden.
 o getXfield
  public int getXfield()
Get xField value which is meant to be the x coordinate of the LineSelection's start point.
Returns:
current value of xField
 o getYfield
  public int getYfield()
Get yField value which is meant to be the y coordinate of the LineSelection's start point.
Returns:
current value of yField
 o handleEvent
  public boolean handleEvent(Event evt)
Overrides:
handleEvent in class Component
 o repaintLsmaster
  public void repaintLsmaster()
The lsMaster 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 dx,
                        int dy)
Set xField, yField, delta_xField, and delta_xField which are meant to be the LineSelection's start point, x component, and y component.

LineSelectionSettingPanel also call the LineSelection to update its start point, x component, and y component

Parameters:
x - x coordinate of the LineSelection's start point with respect to the left top of lsMaster
y - y coordinate of the LineSelection's start point with respect to the left top of lsMaster
dx - the LineSelection's x component
dy - the LineSelection's y component
 o setDelta_xfield
  public void setDelta_xfield(int dx)
Set delta_xField which is meant to be the LineSelection's x component.

LineSelectionSettingPanel also call the LineSelection to update its x component.

Parameters:
dx - the LineSelection's x component
 o setDelta_yfield
  public void setDelta_yfield(int dy)
Set delta_yField which is meant to be the LineSelection's y component.

LineSelectionSettingPanel also call the LineSelection to update its y component.

Parameters:
dy - the LineSelection's y component
 o setXfield
  public void setXfield(int x)
Set xField value which is meant to be the x coordinate of the LineSelection's start point.
Parameters:
x - x coordinate of the LineSelection's start point with respect to the left top of lsMaster
 o setYfield
  public void setYfield(int y)
Set yField value which is meant to be the y coordinate of the LineSelection's start point.
Parameters:
y - y coordinate of the LineSelection's start point with respect to the left top of lsMaster
 o setScroll
  public void setScroll(int t)
Set tkScroll to be LineSelection'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