
 |
Chapter 19 java.awt Reference |
 |
Scrollbar
Name
Scrollbar
The Scrollbar is a Component
that provides the means to get and set values within a predetermined range.
For example, a scrollbar could be used for a volume control. Scrollbars
are most frequently used to help users manipulate areas too large to be
displayed on the screen (pre version 1.1) or to set a value within an integer
range.
Constant used for a Scrollbar
with a horizontal orientation.
Constant used for a Scrollbar
with a vertical orientation.
- Description
-
Constructs a vertical Scrollbar
object; slider size, minimum value, maximum value, and initial value are
all zero.
- Parameters
-
- orientation
-
Scrollbar
constant designating direction.
- Throws
-
- IllegalArgumentException
-
If
orientation is invalid.
- Description
-
Constructs a Scrollbar object,
in the designated direction; slider size, minimum value, maximum value,
and initial value are all zero.
- Parameters
-
- orientation
-
Scrollbar
constant designating direction.
- value
-
Initial value of Scrollbar.
- visible
-
Initial slider size.
- minimum
-
Initial minimum value.
- maximum
-
Initial maximum value.
- Throws
-
- IllegalArgumentException
-
If
orientation is invalid.
- Description
-
Constructs a Scrollbar object
with the given values.
- Parameters
-
- l
-
An object that implements the AdjustmentListener
interface.
- Implements
-
Adjustable.addAdjustmentListener()
- Description
-
Add a listener for adjustment event.
- Overrides
-
Component.addNotify()
- Description
-
Creates Scrollbar's peer.
- Implements
-
Adjustable.getBlockIncrement()
- Returns
-
The amount to scroll when a paging area is selected.
- Returns
-
The amount to scroll when one of the arrows at the ends of the scrollbar
is selected. Replaced by getUnitIncrement().
- Implements
-
Adjustable.getMaximum()
- Returns
-
The maximum value that the Scrollbar
can take.
- Implements
-
Adjustable.getMinimum()
- Returns
-
The minimum value that the Scrollbar
can take.
- Implements
-
Adjustable.getOrientation()
- Returns
-
A constant representing the direction of the Scrollbar.
- Returns
-
The amount to scroll when a paging area is selected. Replaced with getBlockIncrement().
- Implements
-
Adjustable.getUnitIncrement()
- Returns
-
The amount to scroll when one of the arrows at the ends of the scrollbar
is selected.
- Implements
-
Adjustable.getValue()
- Returns
-
The current setting for the Scrollbar.
- Returns
-
The current visible setting (i.e., size) for the slider. Replaced by getVisibleAmount().
- Implements
-
Adjustable.getVisibleAmount()
- Returns
-
The current visible setting (i.e., size) for the slider.
- Parameters
-
- l
-
One of this Scrollbar's
AdjustmentListeners.
- Implements
-
Adjustable.removeAdjustmentListener()
- Description
-
Remove an adjustment event listener.
- Parameters
-
- amount
-
New paging increment amount.
- Implements
-
Adjustable.setBlockIncrement()
- Description
-
Changes the block increment amount for the Scrollbar;
the default block increment is 10.
- Parameters
-
- amount
-
New line increment amount.
- Description
-
Changes the line increment amount for the Scrollbar.
The default line increment is 1. Replaced by setUnitIncrement(int).
- Parameters
-
- newMaximum
-
New maximum value.
- Implements
-
Adjustable.setMaximum()
- Description
-
Changes the maximum value for the Scrollbar.
- Parameters
-
- newMinimum
-
New minimum value.
- Implements
-
Adjustable.setMinimum()
- Description
-
Changes the minimum value for the Scrollbar.
- Parameters
-
- orientation
-
One of the orientation constants HORIZONTAL
or VERTICAL.
- Description
-
Changes the orientation of the Scrollbar.
- Parameters
-
- amount
-
New paging increment amount.
- Description
-
Changes the paging increment amount for the Scrollbar;
the default page increment is 10. Replaced by setBlockIncrement(int).
- Parameters
-
- amount
-
New line increment amount.
- Implements
-
Adjustable.setUnitIncrement()
- Description
-
Changes the unit increment amount for the Scrollbar.
The default unit increment is 1.
- Parameters
-
- value
-
New Scrollbar
value.
- Implements
-
Adjustable.setValue()
- Description
-
Changes the current value of the Scrollbar.
- Parameters
-
- value
-
New Scrollbar
value.
- visible
-
New slider width.
- minimum
-
New minimum value for Scrollbar.
- maximum
-
New maximum value for Scrollbar.
- Description
-
Changes the settings of the Scrollbar
to the given amounts.
- Parameters
-
- newAmount
-
New amount visible.
- Implements
-
Adjustable.setVisibleAmount()
- Description
-
Changes the current visible amount of the Scrollbar.
- Returns
-
String with current settings of Scrollbar.
- Overrides
-
Component.paramString()
- Description
-
Helper method for toString()
to generate string of current settings.
- Parameters
-
- e
-
The adjustment event to process.
- Description
-
Adjustment events are passed to this method for processing. Normally, this
method is called by processEvent().
- Parameters
-
- e
-
The event to process.
- Description
-
Low level AWTEvents are passed
to this method for processing.
Adjustable, Component,
String
|