Class ncsa.horizon.awt.IntScrollPanel
All Packages Class Hierarchy This Package Previous Next Index
Class ncsa.horizon.awt.IntScrollPanel
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----ncsa.horizon.awt.IntScrollPanel
- public class IntScrollPanel
- extends Panel
This class is a labeled and value-displaying horizontal scrollbar. The value
is displayed in a TextField which becomes editable or non-editalbe dynamically.
-
label
-
-
NOT_MATCHED
- returned by matchEventTarget() if a match is not made to the
input Event target.
-
scroll
-
-
SCROLLBAR
- returned by matchEventTarget() if input Event target matches
the scrollbar
-
value
-
-
VALUE_FIELD
- returned by matchEventTarget() if input Event target matches
the value text field
-
IntScrollPanel(int, String)
- Create a scrollbar with label and value fields.
-
IntScrollPanel(String)
- Create a scrollbar with label and value fields.
-
action(Event, Object)
-
-
getLabel()
- Get the label value.
-
getLineIncrement()
- Get the scrollbar's line increment value.
-
getMaximum()
- Get the scrollbar's maximum value.
-
getMinimum()
- Get the scrollbar's minimum value.
-
getOrientation()
- Get the scrollbar's orientation value.
-
getPageIncrement()
- Get the scrollbar's page increment value.
-
getValue()
- Get the scrollbar's current value.
-
getVisible()
- Get the scrollbar's visible value.
-
handleEvent(Event)
- Handle all scrollbar events.
-
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)
-
-
reshape(int, int, int, int)
- Make sure all components get resized.
-
setLabel(String)
- Set the label.
-
setLineIncrement(int)
- Set the scrollbar's line increment value.
-
setPageIncrement(int)
- Set the scrollbar's page increment value.
-
setValue(int)
- Set the scrollbar's value.
-
setValues(int, int, int, int)
- Set several of the the scrollbar's values.
-
toString()
- Get a string representation of the extended scrollbar values.
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
SCROLLBAR
public final static int SCROLLBAR
- returned by matchEventTarget() if input Event target matches
the scrollbar
scroll
protected Scrollbar scroll
label
protected Label label
value
protected TextField value
IntScrollPanel
public IntScrollPanel(String l)
- Create a scrollbar with label and value fields.
The maximum value will be 100.
- Parameters:
- l - The label for the scrollbar.
IntScrollPanel
public IntScrollPanel(int maximum,
String l)
- Create a scrollbar with label and value fields.
- Parameters:
- maximum - The maximum int value.
- l - The label for the scrollbar.
action
public boolean action(Event ev,
Object obj)
- Overrides:
- action in class Component
handleEvent
public boolean handleEvent(Event evt)
- Handle all scrollbar events. The associated text field is updated
on any scrollbar manipulation. This implementation lets the
superclass
handle all non-scroll events.
- Parameters:
- evt - The Scrollbar event to handle.
- Returns:
- true if event has been handled; false otherwise.
- Overrides:
- handleEvent 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
- SCROLLBAR: the target matches the scrollbar
getLineIncrement
public int getLineIncrement()
- Get the scrollbar's line increment value.
- Returns:
- The increment value.
getMaximum
public int getMaximum()
- Get the scrollbar's maximum value.
- Returns:
- The maximum value.
getMinimum
public int getMinimum()
- Get the scrollbar's minimum value.
- Returns:
- The minimum value.
getOrientation
public int getOrientation()
- Get the scrollbar's orientation value.
- Returns:
- The orientation value.
getPageIncrement
public int getPageIncrement()
- Get the scrollbar's page increment value.
- Returns:
- The increment value.
getValue
public int getValue()
- Get the scrollbar's current value.
- Returns:
- The current value.
getVisible
public int getVisible()
- Get the scrollbar's visible value.
- Returns:
- The visible value.
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
setLineIncrement
public void setLineIncrement(int l)
- Set the scrollbar's line increment value.
- Parameters:
- l - The line increment value.
setPageIncrement
public void setPageIncrement(int l)
- Set the scrollbar's page increment value.
- Parameters:
- l - The page increment value.
setValue
public void setValue(int _value)
- Set the scrollbar's value.
- Parameters:
- l - The value.
setValues
public void setValues(int _value,
int visible,
int minimum,
int maximum)
- Set several of the the scrollbar's values.
- Parameters:
- _value - The value.
- visible - The visibility value.
- minimum - The minimum value.
- maximum - The maximum value.
setLabel
public void setLabel(String l)
- Set the label.
- Parameters:
- l - The label value.
getLabel
public String getLabel()
- Get the label value.
- Returns:
- The label.
toString
public String toString()
- Get a string representation of the extended scrollbar values.
- Returns:
- The values of the label and scrollbar.
- Overrides:
- toString in class Component
reshape
public void reshape(int x,
int y,
int width,
int height)
- Make sure all components get resized.
- Overrides:
- reshape in class Component
All Packages Class Hierarchy This Package Previous Next Index