public interface Adjustable
The interface for objects which have an adjustable numeric value contained within a bounded range of values.
@Native static final int HORIZONTAL
Indicates that the Adjustable
has horizontal orientation.
@Native static final int VERTICAL
Indicates that the Adjustable
has vertical orientation.
@Native static final int NO_ORIENTATION
Indicates that the Adjustable
has no orientation.
int getOrientation()
Gets the orientation of the adjustable object.
HORIZONTAL
, VERTICAL
, or NO_ORIENTATION
void setMinimum(int min)
Sets the minimum value of the adjustable object.
min
- the minimum valueint getMinimum()
Gets the minimum value of the adjustable object.
void setMaximum(int max)
Sets the maximum value of the adjustable object.
max
- the maximum valueint getMaximum()
Gets the maximum value of the adjustable object.
void setUnitIncrement(int u)
Sets the unit value increment for the adjustable object.
u
- the unit incrementint getUnitIncrement()
Gets the unit value increment for the adjustable object.
void setBlockIncrement(int b)
Sets the block value increment for the adjustable object.
b
- the block incrementint getBlockIncrement()
Gets the block value increment for the adjustable object.
void setVisibleAmount(int v)
Sets the length of the proportional indicator of the adjustable object.
v
- the length of the indicatorint getVisibleAmount()
Gets the length of the proportional indicator.
void setValue(int v)
Sets the current value of the adjustable object. If the value supplied is less than minimum
or greater than maximum
- visibleAmount
, then one of those values is substituted, as appropriate.
Calling this method does not fire an AdjustmentEvent
.
v
- the current value, between minimum
and maximum
- visibleAmount
int getValue()
Gets the current value of the adjustable object.
void addAdjustmentListener(AdjustmentListener l)
Adds a listener to receive adjustment events when the value of the adjustable object changes.
l
- the listener to receive eventsAdjustmentEvent
void removeAdjustmentListener(AdjustmentListener l)
Removes an adjustment listener.
l
- the listener being removedAdjustmentEvent
© 1993–2017, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.