ScrollPaneAdjustable (Java Platform SE 6) (original) (raw)
java.awt
Class ScrollPaneAdjustable
java.lang.Object
java.awt.ScrollPaneAdjustable
All Implemented Interfaces:
public class ScrollPaneAdjustable
extends Object
implements Adjustable, Serializable
This class represents the state of a horizontal or vertical scrollbar of a ScrollPane
. Objects of this class are returned by ScrollPane
methods.
Since:
1.4
See Also:
Field Summary |
---|
Fields inherited from interface java.awt.Adjustable |
---|
HORIZONTAL, NO_ORIENTATION, VERTICAL |
Method Summary | |
---|---|
void | addAdjustmentListener(AdjustmentListener l) Adds the specified adjustment listener to receive adjustment events from this ScrollPaneAdjustable. |
AdjustmentListener[] | getAdjustmentListeners() Returns an array of all the adjustment listeners registered on this ScrollPaneAdjustable. |
int | getBlockIncrement() Gets the block value increment for the adjustable object. |
int | getMaximum() Gets the maximum value of the adjustable object. |
int | getMinimum() Gets the minimum value of the adjustable object. |
int | getOrientation() Returns the orientation of this scrollbar. |
int | getUnitIncrement() Gets the unit value increment for the adjustable object. |
int | getValue() Gets the current value of the adjustable object. |
boolean | getValueIsAdjusting() Returns true if the value is in the process of changing as a result of actions being taken by the user. |
int | getVisibleAmount() Gets the length of the proportional indicator. |
String | paramString() Returns a string representing the state of this scrollbar. |
void | removeAdjustmentListener(AdjustmentListener l) Removes the specified adjustment listener so that it no longer receives adjustment events from this ScrollPaneAdjustable. |
void | setBlockIncrement(int b) Sets the block value increment for the adjustable object. |
void | setMaximum(int max) This method should NOT be called by user code. |
void | setMinimum(int min) This method should NOT be called by user code. |
void | setUnitIncrement(int u) Sets the unit value increment for the adjustable object. |
void | setValue(int v) Sets the value of this scrollbar to the specified value. |
void | setValueIsAdjusting(boolean b) Sets the valueIsAdjusting property. |
void | setVisibleAmount(int v) This method should NOT be called by user code. |
String | toString() Returns a string representation of this scrollbar and its values. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, [wait](../../java/lang/Object.html#wait%28long, int%29) |
Method Detail |
---|
getOrientation
public int getOrientation()
Returns the orientation of this scrollbar.
Specified by:
[getOrientation](../../java/awt/Adjustable.html#getOrientation%28%29)
in interface [Adjustable](../../java/awt/Adjustable.html "interface in java.awt")
Returns:
the orientation of this scrollbar, eitherAdjustable.HORIZONTAL
orAdjustable.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 implementAdjustable
interface.
Specified by:
[setMinimum](../../java/awt/Adjustable.html#setMinimum%28int%29)
in interface [Adjustable](../../java/awt/Adjustable.html "interface in java.awt")
Parameters:
min
- the minimum value
Throws:
`AWTError`
- Always throws an error when called.
getMinimum
public int getMinimum()
Description copied from interface: [Adjustable](../../java/awt/Adjustable.html#getMinimum%28%29)
Gets the minimum value of the adjustable object.
Specified by:
[getMinimum](../../java/awt/Adjustable.html#getMinimum%28%29)
in interface [Adjustable](../../java/awt/Adjustable.html "interface in java.awt")
Returns:
the minimum value of the adjustable object
setMaximum
public void setMaximum(int max)
This method should NOT be called by user code. This method is public for this class to properly implementAdjustable
interface.
Specified by:
[setMaximum](../../java/awt/Adjustable.html#setMaximum%28int%29)
in interface [Adjustable](../../java/awt/Adjustable.html "interface in java.awt")
Parameters:
max
- the maximum value
Throws:
`AWTError`
- Always throws an error when called.
getMaximum
public int getMaximum()
Description copied from interface: [Adjustable](../../java/awt/Adjustable.html#getMaximum%28%29)
Gets the maximum value of the adjustable object.
Specified by:
[getMaximum](../../java/awt/Adjustable.html#getMaximum%28%29)
in interface [Adjustable](../../java/awt/Adjustable.html "interface in java.awt")
Returns:
the maximum value of the adjustable object
setUnitIncrement
public void setUnitIncrement(int u)
Description copied from interface: [Adjustable](../../java/awt/Adjustable.html#setUnitIncrement%28int%29)
Sets the unit value increment for the adjustable object.
Specified by:
[setUnitIncrement](../../java/awt/Adjustable.html#setUnitIncrement%28int%29)
in interface [Adjustable](../../java/awt/Adjustable.html "interface in java.awt")
Parameters:
u
- the unit increment
getUnitIncrement
public int getUnitIncrement()
Description copied from interface: [Adjustable](../../java/awt/Adjustable.html#getUnitIncrement%28%29)
Gets the unit value increment for the adjustable object.
Specified by:
[getUnitIncrement](../../java/awt/Adjustable.html#getUnitIncrement%28%29)
in interface [Adjustable](../../java/awt/Adjustable.html "interface in java.awt")
Returns:
the unit value increment for the adjustable object
setBlockIncrement
public void setBlockIncrement(int b)
Description copied from interface: [Adjustable](../../java/awt/Adjustable.html#setBlockIncrement%28int%29)
Sets the block value increment for the adjustable object.
Specified by:
[setBlockIncrement](../../java/awt/Adjustable.html#setBlockIncrement%28int%29)
in interface [Adjustable](../../java/awt/Adjustable.html "interface in java.awt")
Parameters:
b
- the block increment
getBlockIncrement
public int getBlockIncrement()
Description copied from interface: [Adjustable](../../java/awt/Adjustable.html#getBlockIncrement%28%29)
Gets the block value increment for the adjustable object.
Specified by:
[getBlockIncrement](../../java/awt/Adjustable.html#getBlockIncrement%28%29)
in interface [Adjustable](../../java/awt/Adjustable.html "interface in java.awt")
Returns:
the block value increment for the adjustable object
setVisibleAmount
public void setVisibleAmount(int v)
This method should NOT be called by user code. This method is public for this class to properly implementAdjustable
interface.
Specified by:
[setVisibleAmount](../../java/awt/Adjustable.html#setVisibleAmount%28int%29)
in interface [Adjustable](../../java/awt/Adjustable.html "interface in java.awt")
Parameters:
v
- the length of the indicator
Throws:
`AWTError`
- Always throws an error when called.
getVisibleAmount
public int getVisibleAmount()
Description copied from interface: [Adjustable](../../java/awt/Adjustable.html#getVisibleAmount%28%29)
Gets the length of the proportional indicator.
Specified by:
[getVisibleAmount](../../java/awt/Adjustable.html#getVisibleAmount%28%29)
in interface [Adjustable](../../java/awt/Adjustable.html "interface in java.awt")
Returns:
the length of the proportional indicator
setValueIsAdjusting
public void setValueIsAdjusting(boolean b)
Sets the valueIsAdjusting
property.
Parameters:
b
- new adjustment-in-progress status
Since:
1.4
See Also:
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 valueIsAdjusting
property
See Also:
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:
[setValue](../../java/awt/Adjustable.html#setValue%28int%29)
in interface [Adjustable](../../java/awt/Adjustable.html "interface in java.awt")
Parameters:
v
- the new value of the scrollbar
getValue
public int getValue()
Description copied from interface: [Adjustable](../../java/awt/Adjustable.html#getValue%28%29)
Gets the current value of the adjustable object.
Specified by:
[getValue](../../java/awt/Adjustable.html#getValue%28%29)
in interface [Adjustable](../../java/awt/Adjustable.html "interface in java.awt")
Returns:
the current value of the adjustable object
addAdjustmentListener
public void addAdjustmentListener(AdjustmentListener l)
Adds the specified adjustment listener to receive adjustment events from this ScrollPaneAdjustable
. If l
is null
, no exception is thrown and no action is performed.
Refer to AWT Threading Issues for details on AWT's threading model.
Specified by:
[addAdjustmentListener](../../java/awt/Adjustable.html#addAdjustmentListener%28java.awt.event.AdjustmentListener%29)
in interface [Adjustable](../../java/awt/Adjustable.html "interface in java.awt")
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 this ScrollPaneAdjustable
. If l
is null
, no exception is thrown and no action is performed.
Refer to AWT Threading Issues for details on AWT's threading model.
Specified by:
[removeAdjustmentListener](../../java/awt/Adjustable.html#removeAdjustmentListener%28java.awt.event.AdjustmentListener%29)
in interface [Adjustable](../../java/awt/Adjustable.html "interface in java.awt")
Parameters:
l
- the adjustment listener.
Since:
JDK1.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 this ScrollPaneAdjustable
.
Returns:
all of this ScrollPaneAdjustable
'sAdjustmentListener
s 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.
Overrides:
[toString](../../java/lang/Object.html#toString%28%29)
in class [Object](../../java/lang/Object.html "class in java.lang")
Returns:
a string representation of this scrollbar.
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 be null
.
Returns:
the parameter string of this scrollbar.
Submit a bug or feature
For further API reference and developer documentation, see Java SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2015, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
Scripting on this page tracks web page traffic, but does not change the content in any way.