    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.

##

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

##

CursorSettingPanel(Cursor, Component)
  Create a CursorSettingPanel.

##

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

##

cursor

      protected Cursor cursor

  The cursor to be controlled by this CursorSettingPanel.

cursorMaster

      protected Component cursorMaster

  The component to which cursor associated.

showBox

      protected Checkbox showBox

  A Checkbox used to control and show the current cursor visible state.

xField

      protected LabeledField xField

  LabeledField to set and show current cursor position.

yField

      protected LabeledField yField

  LabeledField to set and show current cursor position.

colorChoice

      protected Choice colorChoice

  Choice to set Color and Style of the cursor

styleChoice

      protected Choice styleChoice

  Choice to set Color and Style of the cursor

colorArray

      protected Color colorArray[]

wdScroll

      protected IntScrollPanel wdScroll

  The IntScrollPanel to control width, height, and thickness

htScroll

      protected IntScrollPanel htScroll

  The IntScrollPanel to control width, height, and thickness

tkScroll

      protected IntScrollPanel tkScroll

  The IntScrollPanel to control width, height, and thickness

##

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.

##

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

getColorchoice

      public Color getColorchoice()

  Get the Color from colorChoice's current value

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

getXfield

      public int getXfield()

  Get xField value which is meant to be the x coordinate of the Cursor's current position.

getYfield

      public int getYfield()

  Get yField value which is meant to be the y coordinate of the Cursor's current position.

handleEvent

      public boolean handleEvent(Event evt)

Overrides:
  handleEvent in class Component

repaintCursormaster

      public void repaintCursormaster()

  The cursorMaster 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)

  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

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

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

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

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