The Adjustable interface is new to Java 1.1. It provides the method signatures required for an object that lets you adjust a bounded integer value. It is currently implemented by Scrollbar and returned by two methods within ScrollPane.
There are two direction specifiers for Adjustable.
HORIZONTAL is the constant for horizontal orientation.
VERTICAL is the constant for vertical orientation.
The getOrientation() method is for returning the current orientation of the adjustable object, either Adjustable.HORIZONTAL or Adjustable.VERTICAL.
setOrientation() is not part of the interface. Not all adjustable objects need to be able to alter orientation. For example, Scrollbar instances can change their orientation, but each Adjustable instance associated with a ScrollPane has a fixed, unchangeable orientation.
The getVisibleAmount() method lets you retrieve the size of the visible slider of the adjustable object.
The setVisibleAmount() method lets you change the size of the visible slider to amount.
The getValue() method lets you retrieve the current value of the adjustable object.
The setValue() method lets you change the value of the adjustable object to value.
The getMinimum() method lets you retrieve the current minimum setting for the object.
The setMinimum() method lets you change the minimum value of the adjustable object to minimum.
The getMaximum() method lets you retrieve the current maximum setting for the object.
The setMaximum() method lets you change the maximum value of the adjustable object to maximum.
The getUnitIncrement() method lets you retrieve the current line increment.
The setUnitIncrement() method lets you change the line increment amount of the adjustable object to amount.
The getBlockIncrement() method lets you retrieve the current page increment.
The setBlockIncrement() method lets you change the paging increment amount of the adjustable object to amount.
The addAdjustmentListener() method lets you register listener as an object interested in being notified when an AdjustmentEvent passes through the EventQueue with this Adjustable object as its target.
The removeAdjustmentListener() method removes listener as a interested listener. If listener is not registered, nothing happens.
This HTML Help has been published using the chm2web software. |