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

Class ncsa.horizon.awt.CursorSettingPanel

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

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

Variable Index

 o colorArray
 o colorChoice
Choice to set Color and Style of the cursor
 o cursor
The cursor to be controlled by this CursorSettingPanel.
 o cursorMaster
The component to which cursor associated.
 o htScroll
The IntScrollPanel to control width, height, and thickness
 o showBox
A Checkbox used to control and show the current cursor visible state.
 o styleChoice
Choice to set Color and Style of the cursor
 o tkScroll
The IntScrollPanel to control width, height, and thickness
 o wdScroll
The IntScrollPanel to control width, height, and thickness
 o xField
LabeledField to set and show current cursor position.
 o yField
LabeledField to set and show current cursor position.

Constructor Index

 o CursorSettingPanel(Cursor, Component)
Create a CursorSettingPanel.

Method Index

 o action(Event, Object)
Handle GUI actions.
 o getColorchoice()
Get the Color from colorChoice's current value
 o getShowbox()
Get the showBox's current state, it represents the visibility of the Cursor
 o getXfield()
Get xField value which is meant to be the x coordinate of the Cursor's current position.
 o getYfield()
Get yField value which is meant to be the y coordinate of the Cursor's current position.
 o handleEvent(Event)
 o repaintCursormaster()
The cursorMaster is updated by calling its repaint() method
 o setColorchoice(Color)
Set a Color to colorChoice's current value
 o setFields(int, int)
Set xField and yField with cursor's current position.
 o setScrolls(int, int, int)
Set wdScroll, htScroll and tkScroll to be cursor's width, height, and 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 Cursor's current position.
 o setYfield(int)
Set yField value which is meant to be the y coordinate of the Cursor's current position.
 o toggleShowbox()
toggle the showBow true, false state.

Variables

 o cursor
  protected Cursor cursor
The cursor to be controlled by this CursorSettingPanel.
 o cursorMaster
  protected Component cursorMaster
The component to which cursor associated.
 o showBox
  protected Checkbox showBox
A Checkbox used to control and show the current cursor visible state.
 o xField
  protected LabeledField xField
LabeledField to set and show current cursor position.
 o yField
  protected LabeledField yField
LabeledField to set and show current cursor position.
 o colorChoice
  protected Choice colorChoice
Choice to set Color and Style of the cursor
 o styleChoice
  protected Choice styleChoice
Choice to set Color and Style of the cursor
 o colorArray
  protected Color colorArray[]
 o wdScroll
  protected IntScrollPanel wdScroll
The IntScrollPanel to control width, height, and thickness
 o htScroll
  protected IntScrollPanel htScroll
The IntScrollPanel to control width, height, and thickness
 o tkScroll
  protected IntScrollPanel tkScroll
The IntScrollPanel to control width, height, and thickness

Constructors

 o CursorSettingPanel
  public CursorSettingPanel(Cursor cursor,
                            Component c)
Create a CursorSettingPanel.
Parameters:
cursor - The cursor to be controlled by this CursorSettingPanel.
c - The Component which the cursor associated to.

Methods

 o action
  public boolean action(Event ev,
                        Object obj)
Handle 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
 o getShowbox
  public boolean getShowbox()
Get the showBox's current state, it represents the visibility of the Cursor
Returns:
true if the Cursor is visible, false if the Cursor is hiden
 o getXfield
  public int getXfield()
Get xField value which is meant to be the x coordinate of the Cursor's current position.
 o getYfield
  public int getYfield()
Get yField value which is meant to be the y coordinate of the Cursor's current position.
 o handleEvent
  public boolean handleEvent(Event evt)
Overrides:
handleEvent in class Component
 o repaintCursormaster
  public void repaintCursormaster()
The cursorMaster 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)
Set xField and yField with cursor's current position.
Parameters:
x - x coordinate of current cursor with respect to the left top of cursorMaster
y - y coordinate of current cursor with respect to the left top of cursorMaster
 o setXfield
  public void setXfield(int x)
Set xField value which is meant to be the x coordinate of the Cursor's current position.
Parameters:
x - x coordinate of the cursor's position 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 Cursor's current position.
Parameters:
y - y coordinate of the cursor's position with respect to the left top of lsMaster
 o setScrolls
  public void setScrolls(int w,
                         int h,
                         int t)
Set wdScroll, htScroll and tkScroll to be cursor's width, height, and thickness.
Parameters:
w - width
h - height
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