- All Known Implementing Classes:
- JScrollBar,- JScrollPane.ScrollBar,- Scrollbar,- ScrollPaneAdjustable
public interface Adjustable
The interface for objects which have an adjustable numeric value
 contained within a bounded range of values.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intIndicates that theAdjustablehas horizontal orientation.static final intIndicates that theAdjustablehas no orientation.static final intIndicates that theAdjustablehas vertical orientation.
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds a listener to receive adjustment events when the value of the adjustable object changes.intGets the block value increment for the adjustable object.intGets the maximum value of the adjustable object.intGets the minimum value of the adjustable object.intGets the orientation of the adjustable object.intGets the unit value increment for the adjustable object.intgetValue()Gets the current value of the adjustable object.intGets the length of the proportional indicator.voidRemoves an adjustment listener.voidsetBlockIncrement(int b) Sets the block value increment for the adjustable object.voidsetMaximum(int max) Sets the maximum value of the adjustable object.voidsetMinimum(int min) Sets the minimum value of the adjustable object.voidsetUnitIncrement(int u) Sets the unit value increment for the adjustable object.voidsetValue(int v) Sets the current value of the adjustable object.voidsetVisibleAmount(int v) Sets the length of the proportional indicator of the adjustable object.
- 
Field Details- 
HORIZONTALIndicates that theAdjustablehas horizontal orientation.- See Also:
 
- 
VERTICALIndicates that theAdjustablehas vertical orientation.- See Also:
 
- 
NO_ORIENTATIONIndicates that theAdjustablehas no orientation.- See Also:
 
 
- 
- 
Method Details- 
getOrientationint getOrientation()Gets the orientation of the adjustable object.- Returns:
- the orientation of the adjustable object;
   either HORIZONTAL,VERTICAL, orNO_ORIENTATION
 
- 
setMinimumvoid setMinimum(int min) Sets the minimum value of the adjustable object.- Parameters:
- min- the minimum value
 
- 
getMinimumint getMinimum()Gets the minimum value of the adjustable object.- Returns:
- the minimum value of the adjustable object
 
- 
setMaximumvoid setMaximum(int max) Sets the maximum value of the adjustable object.- Parameters:
- max- the maximum value
 
- 
getMaximumint getMaximum()Gets the maximum value of the adjustable object.- Returns:
- the maximum value of the adjustable object
 
- 
setUnitIncrementvoid setUnitIncrement(int u) Sets the unit value increment for the adjustable object.- Parameters:
- u- the unit increment
 
- 
getUnitIncrementint getUnitIncrement()Gets the unit value increment for the adjustable object.- Returns:
- the unit value increment for the adjustable object
 
- 
setBlockIncrementvoid setBlockIncrement(int b) Sets the block value increment for the adjustable object.- Parameters:
- b- the block increment
 
- 
getBlockIncrementint getBlockIncrement()Gets the block value increment for the adjustable object.- Returns:
- the block value increment for the adjustable object
 
- 
setVisibleAmountvoid setVisibleAmount(int v) Sets the length of the proportional indicator of the adjustable object.- Parameters:
- v- the length of the indicator
 
- 
getVisibleAmountint getVisibleAmount()Gets the length of the proportional indicator.- Returns:
- the length of the proportional indicator
 
- 
setValuevoid setValue(int v) Sets the current value of the adjustable object. If the value supplied is less thanminimumor greater thanmaximum-visibleAmount, then one of those values is substituted, as appropriate.Calling this method does not fire an AdjustmentEvent.- Parameters:
- v- the current value, between- minimumand- maximum-- visibleAmount
 
- 
getValueint getValue()Gets the current value of the adjustable object.- Returns:
- the current value of the adjustable object
 
- 
addAdjustmentListenerAdds a listener to receive adjustment events when the value of the adjustable object changes.- Parameters:
- l- the listener to receive events
- See Also:
 
- 
removeAdjustmentListenerRemoves an adjustment listener.- Parameters:
- l- the listener being removed
- See Also:
 
 
-