java.awt

Interface Adjustable

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

UNKNOWN: updated to 1.4

Field Summary
intHORIZONTAL
Constant for an adjustable object with horizontal orientation.
intNO_ORIENTATION
Constant for an adjustable object with no orientation.
intVERTICAL
Constant for an adjustable object with vertical orientation.
Method Summary
voidaddAdjustmentListener(AdjustmentListener listener)
Adds a listener that will receive adjustment events for this object.
intgetBlockIncrement()
Returns the increment value for incrementing the value by blocks.
intgetMaximum()
Returns the maximum value this object can have.
intgetMinimum()
Returns the minimum value this object can have.
intgetOrientation()
Returns a constant representing the orientation of the object.
intgetUnitIncrement()
Returns the increment value for incrementing the value by units.
intgetValue()
Returns the current value of the object.
intgetVisibleAmount()
Returns the length of the indicator for this object.
voidremoveAdjustmentListener(AdjustmentListener listener)
Removes an adjustment listener from this object.
voidsetBlockIncrement(int increment)
Sets the increment value for incrementing the value by blocks.
voidsetMaximum(int maximum)
Sets the maximum value this object can have.
voidsetMinimum(int minimum)
Sets the minimum value this object can have.
voidsetUnitIncrement(int increment)
Sets the increment value for incrementing the value by units.
voidsetValue(int value)
Sets the current value of the object.
voidsetVisibleAmount(int length)
Sets the length of the indicator for this object to the specified value.

Field Detail

HORIZONTAL

public int HORIZONTAL
Constant for an adjustable object with horizontal orientation.

NO_ORIENTATION

public int NO_ORIENTATION
Constant for an adjustable object with no orientation.

VERTICAL

public int VERTICAL
Constant for an adjustable object with vertical orientation.

Method Detail

addAdjustmentListener

public 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

getBlockIncrement

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

Returns: the block increment value

getMaximum

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

Returns: the maximum value

getMinimum

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

Returns: the minimum value

getOrientation

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

Returns: the orientation of this object

See Also: HORIZONTAL VERTICAL NO_ORIENTATION

getUnitIncrement

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

Returns: the unit increment value

getValue

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

Returns: the current value

getVisibleAmount

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

Returns: the indicator length

removeAdjustmentListener

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

Parameters: listener the adjustment listener to remove

See Also: AdjustmentEvent

setBlockIncrement

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

Parameters: increment the block increment value

setMaximum

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

Parameters: maximum the new maximum value

setMinimum

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

Parameters: minimum the new minimum value

setUnitIncrement

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

Parameters: increment the unit increment value

setValue

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

Parameters: value the new value

setVisibleAmount

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

Parameters: length the indicator length