Class ncsa.horizon.awt.LabeledField
All Packages Class Hierarchy This Package Previous Next Index
Class ncsa.horizon.awt.LabeledField
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----ncsa.horizon.awt.LabeledField
- public class LabeledField
- extends Panel
A labeled text field.
-
NOT_MATCHED
- returned by matchEventTarget() if a match is not made to the
input Event target.
-
VALUE_FIELD
- returned by matchEventTarget() if input Event target matches
the value text field
-
LabeledField(String)
- Create a new labeled text field.
-
LabeledField(String, int)
- Create a new labeled text field.
-
enable()
- Set the textfield sensitive to user input
-
enable(boolean)
- Set the textfield sensitive or not sensitive
to user input.
-
getLabel()
- Get the label.
-
getValue()
- Get the text field value.
-
highlight()
-
-
isEditable()
-
-
matchEventTarget(Event)
- return an id indicating whether the input event target matches
either the text field or the scrollbar that makes up this component
-
matchEventTarget(Object)
- return an id indicating whether the input event target matches
either the text field or the scrollbar that makes up this component
-
mouseEnter(Event, int, int)
-
-
mouseExit(Event, int, int)
-
-
setEditable(boolean)
-
-
setHighlight(boolean)
-
-
setLabel(String)
- Set the label.
-
setValue(double)
- Set the text field value.
-
setValue(int)
- Set the text field value.
-
setValue(String)
- Set the text field value.
-
toString()
- Return a String version of the conmponent.
NOT_MATCHED
public final static int NOT_MATCHED
- returned by matchEventTarget() if a match is not made to the
input Event target.
VALUE_FIELD
public final static int VALUE_FIELD
- returned by matchEventTarget() if input Event target matches
the value text field
LabeledField
public LabeledField(String l)
- Create a new labeled text field.
- Parameters:
- l - The label for the text field.
LabeledField
public LabeledField(String l,
int w)
- Create a new labeled text field.
- Parameters:
- l - The label for the text field.
- w - The width of the TextField.
enable
public void enable()
- Set the textfield sensitive to user input
- Overrides:
- enable in class Component
enable
public void enable(boolean b)
- Set the textfield sensitive or not sensitive
to user input.
- Parameters:
- b - If true, set the textfield sensitive to user
input. Otherwise, set the textfield insensitive to
user input.
- Overrides:
- enable in class Component
getLabel
public String getLabel()
- Get the label.
- Returns:
- The label for the text field.
getValue
public String getValue()
- Get the text field value.
- Returns:
- The value of the text field.
highlight
public void highlight()
isEditable
public boolean isEditable()
mouseEnter
public boolean mouseEnter(Event event,
int x,
int y)
- Overrides:
- mouseEnter in class Component
mouseExit
public boolean mouseExit(Event event,
int x,
int y)
- Overrides:
- mouseExit in class Component
matchEventTarget
public int matchEventTarget(Object target)
- return an id indicating whether the input event target matches
either the text field or the scrollbar that makes up this component
- Parameters:
- Object - the target object, usually the value of Event.target
- Returns:
- s int one of the following:
- NOT_MATCHED: neither component matches the target
- VALUE_FIELD: the target matches the value field
- SCROLLBAR: the target matches the scrollbar
matchEventTarget
public int matchEventTarget(Event ev)
- return an id indicating whether the input event target matches
either the text field or the scrollbar that makes up this component
- Parameters:
- Event - the event whose target will be checked
- Returns:
- s int one of the following:
- NOT_MATCHED: neither component matches the target
- VALUE_FIELD: the target matches the value field
setEditable
public void setEditable(boolean b)
setHighlight
public void setHighlight(boolean b)
setLabel
public void setLabel(String l)
- Set the label.
- Parameters:
- l - The label for the text field.
setValue
public void setValue(String l)
- Set the text field value.
- Parameters:
- l - The value of the text field.
setValue
public void setValue(double n)
- Set the text field value.
- Parameters:
- n - The value of the text field.
setValue
public void setValue(int n)
- Set the text field value.
- Parameters:
- n - The value of the text field.
toString
public String toString()
- Return a String version of the conmponent.
- Returns:
- The value of the label and text fields.
- Overrides:
- toString in class Component
All Packages Class Hierarchy This Package Previous Next Index