APIdia Launch Partner
Top Description Fields Methods
java.awt

public Interface Adjustable

Known Direct Implementers
java.awt.Scrollbar, java.awt.ScrollPaneAdjustable, javax.swing.JScrollBar
Imports
java.awt.event.*, java.lang.annotation.Native

The interface for objects which have an adjustable numeric value contained within a bounded range of values.
Authors
Amy Fowler, Tim Prinzing

Field Summary

Modifier and TypeField and Description
public static final int
HORIZONTAL

Indicates that the Adjustable has horizontal orientation.

public static final int
NO_ORIENTATION

Indicates that the Adjustable has no orientation.

public static final int
VERTICAL

Indicates that the Adjustable has vertical orientation.

Method Summary

Modifier and TypeMethod and Description
public void
addAdjustmentListener(AdjustmentListener
the listener to receive events
l
)

Adds a listener to receive adjustment events when the value of the adjustable object changes.

public int

Returns:

the block value increment for the adjustable object
getBlockIncrement
()

Gets the block value increment for the adjustable object.

public int

Returns:

the maximum value of the adjustable object
getMaximum
()

Gets the maximum value of the adjustable object.

public int

Returns:

the minimum value of the adjustable object
getMinimum
()

Gets the minimum value of the adjustable object.

public int

Returns:

the orientation of the adjustable object; either HORIZONTAL, VERTICAL, or NO_ORIENTATION
getOrientation
()

Gets the orientation of the adjustable object.

public int

Returns:

the unit value increment for the adjustable object
getUnitIncrement
()

Gets the unit value increment for the adjustable object.

public int

Returns:

the current value of the adjustable object
getValue
()

Gets the current value of the adjustable object.

public int

Returns:

the length of the proportional indicator
getVisibleAmount
()

Gets the length of the proportional indicator.

public void
removeAdjustmentListener(AdjustmentListener
the listener being removed
l
)

Removes an adjustment listener.

public void
setBlockIncrement(int
the block increment
b
)

Sets the block value increment for the adjustable object.

public void
setMaximum(int
the maximum value
max
)

Sets the maximum value of the adjustable object.

public void
setMinimum(int
the minimum value
min
)

Sets the minimum value of the adjustable object.

public void
setUnitIncrement(int
the unit increment
u
)

Sets the unit value increment for the adjustable object.

public void
setValue(int
the current value, between minimum and maximum - visibleAmount
v
)

Sets the current value of the adjustable object.

public void
setVisibleAmount(int
the length of the indicator
v
)

Sets the length of the proportional indicator of the adjustable object.

Field Detail

HORIZONTALback to summary
public static final int HORIZONTAL

Indicates that the Adjustable has horizontal orientation.

Annotations
@Native
NO_ORIENTATIONback to summary
public static final int NO_ORIENTATION

Indicates that the Adjustable has no orientation.

Annotations
@Native
VERTICALback to summary
public static final int VERTICAL

Indicates that the Adjustable has vertical orientation.

Annotations
@Native

Method Detail

addAdjustmentListenerback to summary
public void addAdjustmentListener(AdjustmentListener l)

Adds a listener to receive adjustment events when the value of the adjustable object changes.

Parameters
l:AdjustmentListener

the listener to receive events

See Also
AdjustmentEvent
getBlockIncrementback to summary
public int getBlockIncrement()

Gets the block value increment for the adjustable object.

Returns:int

the block value increment for the adjustable object

getMaximumback to summary
public int getMaximum()

Gets the maximum value of the adjustable object.

Returns:int

the maximum value of the adjustable object

getMinimumback to summary
public int getMinimum()

Gets the minimum value of the adjustable object.

Returns:int

the minimum value of the adjustable object

getOrientationback to summary
public int getOrientation()

Gets the orientation of the adjustable object.

Returns:int

the orientation of the adjustable object; either HORIZONTAL, VERTICAL, or NO_ORIENTATION

getUnitIncrementback to summary
public int getUnitIncrement()

Gets the unit value increment for the adjustable object.

Returns:int

the unit value increment for the adjustable object

getValueback to summary
public int getValue()

Gets the current value of the adjustable object.

Returns:int

the current value of the adjustable object

getVisibleAmountback to summary
public int getVisibleAmount()

Gets the length of the proportional indicator.

Returns:int

the length of the proportional indicator

removeAdjustmentListenerback to summary
public void removeAdjustmentListener(AdjustmentListener l)

Removes an adjustment listener.

Parameters
l:AdjustmentListener

the listener being removed

See Also
AdjustmentEvent
setBlockIncrementback to summary
public void setBlockIncrement(int b)

Sets the block value increment for the adjustable object.

Parameters
b:int

the block increment

setMaximumback to summary
public void setMaximum(int max)

Sets the maximum value of the adjustable object.

Parameters
max:int

the maximum value

setMinimumback to summary
public void setMinimum(int min)

Sets the minimum value of the adjustable object.

Parameters
min:int

the minimum value

setUnitIncrementback to summary
public void setUnitIncrement(int u)

Sets the unit value increment for the adjustable object.

Parameters
u:int

the unit increment

setValueback to summary
public 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.

Parameters
v:int

the current value, between minimum and maximum - visibleAmount

setVisibleAmountback to summary
public void setVisibleAmount(int v)

Sets the length of the proportional indicator of the adjustable object.

Parameters
v:int

the length of the indicator