java.awt
Interface Adjustable

All Known Implementing Classes:
JScrollBar, JScrollPane.ScrollBar, Scrollbar, ScrollPaneAdjustable

public interface Adjustable

This interface is for objects that take a numeric value that can be adjusted within a bounded range. For example, a scroll bar.

Since:
1.0

Field Summary
static int HORIZONTAL
          Constant for an adjustable object with horizontal orientation.
static int NO_ORIENTATION
          Constant for an adjustable object with no orientation.
static int VERTICAL
          Constant for an adjustable object with vertical orientation.
 
Method Summary
 void addAdjustmentListener(AdjustmentListener listener)
          Adds a listener that will receive adjustment events for this object.
 int getBlockIncrement()
          Returns the increment value for incrementing the value by blocks.
 int getMaximum()
          Returns the maximum value this object can have.
 int getMinimum()
          Returns the minimum value this object can have.
 int getOrientation()
          Returns a constant representing the orientation of the object.
 int getUnitIncrement()
          Returns the increment value for incrementing the value by units.
 int getValue()
          Returns the current value of the object.
 int getVisibleAmount()
          Returns the length of the indicator for this object.
 void removeAdjustmentListener(AdjustmentListener listener)
          Removes an adjustment listener from this object.
 void setBlockIncrement(int increment)
          Sets the increment value for incrementing the value by blocks.
 void setMaximum(int maximum)
          Sets the maximum value this object can have.
 void setMinimum(int minimum)
          Sets the minimum value this object can have.
 void setUnitIncrement(int increment)
          Sets the increment value for incrementing the value by units.
 void setValue(int value)
          Sets the current value of the object.
 void setVisibleAmount(int length)
          Sets the length of the indicator for this object to the specified value.
 

Field Detail

HORIZONTAL

static final int HORIZONTAL
Constant for an adjustable object with horizontal orientation.

See Also:
Constant Field Values

VERTICAL

static final int VERTICAL
Constant for an adjustable object with vertical orientation.

See Also:
Constant Field Values

NO_ORIENTATION

static final int NO_ORIENTATION
Constant for an adjustable object with no orientation.

See Also:
Constant Field Values
Method Detail

getOrientation

int getOrientation()
Returns a constant representing the orientation of the object.

Returns:
the orientation of this object
See Also:
HORIZONTAL, VERTICAL, NO_ORIENTATION

setMinimum

void setMinimum(int minimum)
Sets the minimum value this object can have.

Parameters:
minimum - the new minimum value

getMinimum

int getMinimum()
Returns the minimum value this object can have.

Returns:
the minimum value

setMaximum

void setMaximum(int maximum)
Sets the maximum value this object can have.

Parameters:
maximum - the new maximum value

getMaximum

int getMaximum()
Returns the maximum value this object can have.

Returns:
the maximum value

setUnitIncrement

void setUnitIncrement(int increment)
Sets the increment value for incrementing the value by units.

Parameters:
increment - the unit increment value

getUnitIncrement

int getUnitIncrement()
Returns the increment value for incrementing the value by units.

Returns:
the unit increment value

setBlockIncrement

void setBlockIncrement(int increment)
Sets the increment value for incrementing the value by blocks.

Parameters:
increment - the block increment value

getBlockIncrement

int getBlockIncrement()
Returns the increment value for incrementing the value by blocks.

Returns:
the block increment value

setVisibleAmount

void setVisibleAmount(int length)
Sets the length of the indicator for this object to the specified value.

Parameters:
length - the indicator length

getVisibleAmount

int getVisibleAmount()
Returns the length of the indicator for this object.

Returns:
the indicator length

setValue

void setValue(int value)
Sets the current value of the object.

Parameters:
value - the new value

getValue

int getValue()
Returns the current value of the object.

Returns:
the current value

addAdjustmentListener

void addAdjustmentListener(AdjustmentListener listener)
Adds a listener that will receive adjustment events for this object.

Parameters:
listener - the adjustment listener to add
See Also:
AdjustmentEvent

removeAdjustmentListener

void removeAdjustmentListener(AdjustmentListener listener)
Removes an adjustment listener from this object.

Parameters:
listener - the adjustment listener to remove
See Also:
AdjustmentEvent