- java.lang.Object
-
- java.awt.ScrollPaneAdjustable
-
- All Implemented Interfaces:
Adjustable,Serializable
public class ScrollPaneAdjustable extends Object implements Adjustable, Serializable
This class represents the state of a horizontal or vertical scrollbar of aScrollPane. Objects of this class are returned byScrollPanemethods.- Since:
- 1.4
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields declared in interface java.awt.Adjustable
HORIZONTAL, NO_ORIENTATION, VERTICAL
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAdjustmentListener(AdjustmentListener l)Adds the specified adjustment listener to receive adjustment events from thisScrollPaneAdjustable.AdjustmentListener[]getAdjustmentListeners()Returns an array of all the adjustment listeners registered on thisScrollPaneAdjustable.intgetOrientation()Returns the orientation of this scrollbar.booleangetValueIsAdjusting()Returns true if the value is in the process of changing as a result of actions being taken by the user.StringparamString()Returns a string representing the state of this scrollbar.voidremoveAdjustmentListener(AdjustmentListener l)Removes the specified adjustment listener so that it no longer receives adjustment events from thisScrollPaneAdjustable.voidsetMaximum(int max)This method should NOT be called by user code.voidsetMinimum(int min)This method should NOT be called by user code.voidsetValue(int v)Sets the value of this scrollbar to the specified value.voidsetValueIsAdjusting(boolean b)Sets thevalueIsAdjustingproperty.voidsetVisibleAmount(int v)This method should NOT be called by user code.StringtoString()Returns a string representation of this scrollbar and its values.-
Methods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods declared in interface java.awt.Adjustable
getBlockIncrement, getMaximum, getMinimum, getUnitIncrement, getValue, getVisibleAmount, setBlockIncrement, setUnitIncrement
-
-
-
-
Method Detail
-
getOrientation
public int getOrientation()
Returns the orientation of this scrollbar.- Specified by:
getOrientationin interfaceAdjustable- Returns:
- the orientation of this scrollbar, either
Adjustable.HORIZONTALorAdjustable.VERTICAL
-
setMinimum
public void setMinimum(int min)
This method should NOT be called by user code. This method is public for this class to properly implementAdjustableinterface.- Specified by:
setMinimumin interfaceAdjustable- Parameters:
min- the minimum value- Throws:
AWTError- Always throws an error when called.
-
setMaximum
public void setMaximum(int max)
This method should NOT be called by user code. This method is public for this class to properly implementAdjustableinterface.- Specified by:
setMaximumin interfaceAdjustable- Parameters:
max- the maximum value- Throws:
AWTError- Always throws an error when called.
-
setVisibleAmount
public void setVisibleAmount(int v)
This method should NOT be called by user code. This method is public for this class to properly implementAdjustableinterface.- Specified by:
setVisibleAmountin interfaceAdjustable- Parameters:
v- the length of the indicator- Throws:
AWTError- Always throws an error when called.
-
setValueIsAdjusting
public void setValueIsAdjusting(boolean b)
Sets thevalueIsAdjustingproperty.- Parameters:
b- new adjustment-in-progress status- Since:
- 1.4
- See Also:
getValueIsAdjusting()
-
getValueIsAdjusting
public boolean getValueIsAdjusting()
Returns true if the value is in the process of changing as a result of actions being taken by the user.- Returns:
- the value of the
valueIsAdjustingproperty - See Also:
setValueIsAdjusting(boolean)
-
setValue
public void setValue(int v)
Sets the value of this scrollbar to the specified value.If the value supplied is less than the current minimum or greater than the current maximum, then one of those values is substituted, as appropriate.
- Specified by:
setValuein interfaceAdjustable- Parameters:
v- the new value of the scrollbar
-
addAdjustmentListener
public void addAdjustmentListener(AdjustmentListener l)
Adds the specified adjustment listener to receive adjustment events from thisScrollPaneAdjustable. Iflisnull, no exception is thrown and no action is performed.Refer to AWT Threading Issues for details on AWT's threading model.
- Specified by:
addAdjustmentListenerin interfaceAdjustable- Parameters:
l- the adjustment listener.- See Also:
removeAdjustmentListener(java.awt.event.AdjustmentListener),getAdjustmentListeners(),AdjustmentListener,AdjustmentEvent
-
removeAdjustmentListener
public void removeAdjustmentListener(AdjustmentListener l)
Removes the specified adjustment listener so that it no longer receives adjustment events from thisScrollPaneAdjustable. Iflisnull, no exception is thrown and no action is performed.Refer to AWT Threading Issues for details on AWT's threading model.
- Specified by:
removeAdjustmentListenerin interfaceAdjustable- Parameters:
l- the adjustment listener.- Since:
- 1.1
- See Also:
addAdjustmentListener(java.awt.event.AdjustmentListener),getAdjustmentListeners(),AdjustmentListener,AdjustmentEvent
-
getAdjustmentListeners
public AdjustmentListener[] getAdjustmentListeners()
Returns an array of all the adjustment listeners registered on thisScrollPaneAdjustable.- Returns:
- all of this
ScrollPaneAdjustable'sAdjustmentListeners or an empty array if no adjustment listeners are currently registered - Since:
- 1.4
- See Also:
addAdjustmentListener(java.awt.event.AdjustmentListener),removeAdjustmentListener(java.awt.event.AdjustmentListener),AdjustmentListener,AdjustmentEvent
-
toString
public String toString()
Returns a string representation of this scrollbar and its values.
-
paramString
public String paramString()
Returns a string representing the state of this scrollbar. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not benull.- Returns:
- the parameter string of this scrollbar.
-
-