public class

ScrollPaneAdjustable

extends Object
implements Adjustable Serializable
java.lang.Object
   ↳ java.awt.ScrollPaneAdjustable

Class Overview

This class represents the state of a horizontal or vertical scrollbar of a ScrollPane. Objects of this class are returned by ScrollPane methods.

Summary

[Expand]
Inherited Constants
From interface java.awt.Adjustable
Public Methods
synchronized void addAdjustmentListener(AdjustmentListener l)
Adds the specified adjustment listener to receive adjustment events from this ScrollPaneAdjustable.
synchronized 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.
synchronized void removeAdjustmentListener(AdjustmentListener l)
Removes the specified adjustment listener so that it no longer receives adjustment events from this ScrollPaneAdjustable.
synchronized 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.
synchronized 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.
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.awt.Adjustable

Public Methods

public synchronized 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.

Parameters
l the adjustment listener.

public synchronized AdjustmentListener[] getAdjustmentListeners ()

Returns an array of all the adjustment listeners registered on this ScrollPaneAdjustable.

Returns
  • all of this ScrollPaneAdjustable's AdjustmentListeners or an empty array if no adjustment listeners are currently registered

public int getBlockIncrement ()

Gets the block value increment for the adjustable object.

Returns
  • the block value increment for the adjustable object

public int getMaximum ()

Gets the maximum value of the adjustable object.

Returns
  • the maximum value of the adjustable object

public int getMinimum ()

Gets the minimum value of the adjustable object.

Returns
  • the minimum value of the adjustable object

public int getOrientation ()

Returns the orientation of this scrollbar.

Returns
  • the orientation of this scrollbar, either Adjustable.HORIZONTAL or Adjustable.VERTICAL

public int getUnitIncrement ()

Gets the unit value increment for the adjustable object.

Returns
  • the unit value increment for the adjustable object

public int getValue ()

Gets the current value of the adjustable object.

Returns
  • the current value of the adjustable object

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

public int getVisibleAmount ()

Gets the length of the proportional indicator.

Returns
  • the length of the proportional indicator

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.

public synchronized 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.

Parameters
l the adjustment listener.

public synchronized void setBlockIncrement (int b)

Sets the block value increment for the adjustable object.

Parameters
b the block increment

public void setMaximum (int max)

This method should NOT be called by user code. This method is public for this class to properly implement Adjustable interface.

Parameters
max the maximum value
Throws
Always throws an error when called.

public void setMinimum (int min)

This method should NOT be called by user code. This method is public for this class to properly implement Adjustable interface.

Parameters
min the minimum value
Throws
Always throws an error when called.

public synchronized void setUnitIncrement (int u)

Sets the unit value increment for the adjustable object.

Parameters
u the unit increment

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.

Parameters
v the new value of the scrollbar

public void setValueIsAdjusting (boolean b)

Sets the valueIsAdjusting property.

Parameters
b new adjustment-in-progress status

public void setVisibleAmount (int v)

This method should NOT be called by user code. This method is public for this class to properly implement Adjustable interface.

Parameters
v the length of the indicator
Throws
Always throws an error when called.

public String toString ()

Returns a string representation of this scrollbar and its values.

Returns
  • a string representation of this scrollbar.