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.
-
colorArray
-
-
colorChoice
- Choice to set ls's Color
-
delta_xField
- LabeledField to set and show ls's current position, width, and height.
-
delta_yField
- LabeledField to set and show ls's current position, width, and height.
-
ls
- The LineSelection to be controlled by this LineSelectionSettingPanel.
-
lsMaster
- The component to which ls associated.
-
showBox
- A Checkbox used to control and show ls's current visible state.
-
tkScroll
- An IntScrollPanel to control ls thickness
-
xField
- LabeledField to set and show ls's current position, width, and height.
-
yField
- LabeledField to set and show ls's current position, width, and height.
-
LineSelectionSettingPanel(LineSelection, Component)
- Create a LineSelectionSettingPanel.
-
action(Event, Object)
- Handle applet GUI actions.
-
getColorchoice()
- Get the Color from colorChoice's current value
-
getDelta_xfield()
- Get delta_xField value which is meant to be the LineSelection's x component.
-
getDelta_yfield()
- Get delta_yField value which is meant to be the LineSelection's y component.
-
getShowbox()
- Get the showBox's current state, it represents the visibility of
the LineSelection.
-
getXfield()
- Get xField value which is meant to be the x coordinate
of the LineSelection's start point.
-
getYfield()
- Get yField value which is meant to be the y coordinate
of the LineSelection's start point.
-
handleEvent(Event)
-
-
repaintLsmaster()
-
The lsMaster is updated by calling its repaint() method
-
setColorchoice(Color)
- Set a Color to colorChoice's current value
-
setDelta_xfield(int)
- Set delta_xField which is meant to be the LineSelection's
x component.
-
setDelta_yfield(int)
- Set delta_yField which is meant to be the LineSelection's
y component.
-
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.
-
setScroll(int)
- Set tkScroll to be LineSelection's 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 LineSelection's start point.
-
setYfield(int)
- Set yField value which is meant to be the y coordinate
of the LineSelection's start point.
-
toggleShowbox()
- toggle the showBow true, false state.
ls
protected LineSelection ls
- The LineSelection to be controlled by this LineSelectionSettingPanel.
lsMaster
protected Component lsMaster
- The component to which ls associated.
showBox
protected Checkbox showBox
- A Checkbox used to control and show ls's current visible state.
xField
protected LabeledField xField
- LabeledField to set and show ls's current position, width, and height.
yField
protected LabeledField yField
- LabeledField to set and show ls's current position, width, and height.
delta_xField
protected LabeledField delta_xField
- LabeledField to set and show ls's current position, width, and height.
delta_yField
protected LabeledField delta_yField
- LabeledField to set and show ls's current position, width, and height.
colorChoice
protected Choice colorChoice
- Choice to set ls's Color
colorArray
protected Color colorArray[]
tkScroll
protected IntScrollPanel tkScroll
- An IntScrollPanel to control ls thickness
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.
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 current Color of colorChoice which is LineSelection's drawing color
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
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
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.
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
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
handleEvent
public boolean handleEvent(Event evt)
- Overrides:
- handleEvent in class Component
repaintLsmaster
public void repaintLsmaster()
- The lsMaster 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 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
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
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
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
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
setScroll
public void setScroll(int t)
- Set tkScroll to be LineSelection'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