public
void addAdjustmentListener (
AdjustmentListener l)
Implementing: java.awt.Adjustable
Adds an AdjustmentListener. Adjustment listeners are notified
each time the scrollbar's model changes. Adjustment events are
provided for backwards compatibility with java.awt.Scrollbar.
Note that the AdjustmentEvents type property will always have a
placeholder value of AdjustmentEvent.TRACK because all changes
to a BoundedRangeModels value are considered equivalent. To change
the value of a BoundedRangeModel one just sets its value property,
i.e. model.setValue(123). No information about the origin of the
change, e.g. it's a block decrement, is provided. We don't try
fabricate the origin of the change here.
Parameters:
l | | the AdjustmentLister to add |
See also:
removeAdjustmentListener, BoundedRangeModel.addChangeListener
@BeanProperty(bound=false)
public AccessibleContext getAccessibleContext ()
Implementing: javax.accessibility.Accessible
Gets the AccessibleContext associated with this JScrollBar.
For JScrollBar, the AccessibleContext takes the form of an
AccessibleJScrollBar.
A new AccessibleJScrollBar instance is created if necessary.
Returns: an AccessibleJScrollBar that serves as the
AccessibleContext of this JScrollBar
public
int getBlockIncrement ()
Implementing: java.awt.Adjustable
The maximum value of the scrollbar is maximum - extent.
Returns: the value of the model's maximum property
See also:
setMaximum
public Dimension getMaximumSize ()
Overriding: javax.swing.JComponent
The scrollbar is flexible along it's scrolling axis and
rigid along the other axis.
Returns: the value of the maximumSize property
Implementing: java.awt.Adjustable
Returns the minimum value supported by the scrollbar
(usually zero).
Returns: the value of the model's minimum property
See also:
setMinimum
public Dimension getMinimumSize ()
Overriding: javax.swing.JComponent
The scrollbar is flexible along it's scrolling axis and
rigid along the other axis.
Returns: the value of the minimumSize property
@BeanProperty(bound=false)
public String getUIClassID ()
public
int getUnitIncrement ()
public
int getVisibleAmount ()
Implementing: java.awt.Adjustable
Returns the scrollbar's extent, aka its "visibleAmount". In many
scrollbar look and feel implementations the size of the
scrollbar "knob" or "thumb" is proportional to the extent.
Returns: the value of the model's extent property
See also:
setVisibleAmount
protected String paramString ()
Overriding: javax.swing.JComponent
Returns a string representation of this JScrollBar. 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: a string representation of this JScrollBar.
public
void removeAdjustmentListener (
AdjustmentListener l)
@BeanProperty(preferred=true, description="The scrollbar\'s block increment.")
public
void setBlockIncrement (
int blockIncrement)
Implementing: java.awt.Adjustable
Sets the blockIncrement property.
Note, that if the argument is equal to the value of Integer.MIN_VALUE,
the most look and feels will not provide the scrolling to the right/down.
Some look and feels implement custom scrolling behavior
and ignore this property.
Parameters:
blockIncrement | | the block increment |
See also:
getBlockIncrement()
public
void setEnabled (
boolean x)
Overriding: javax.swing.JComponent
Enables the component so that the knob position can be changed.
When the disabled, the knob position cannot be changed.
Parameters:
x | | a boolean value, where true enables the component and
false disables it |
@BeanProperty(bound=false, preferred=true, description="The scrollbar\'s maximum value.")
public
void setMaximum (
int maximum)
@BeanProperty(bound=false, preferred=true, description="The scrollbar\'s minimum value.")
public
void setMinimum (
int minimum)
@BeanProperty(preferred=true, description="The scrollbar\'s unit increment.")
public
void setUnitIncrement (
int unitIncrement)
Implementing: java.awt.Adjustable
Sets the unitIncrement property.
Note, that if the argument is equal to the value of Integer.MIN_VALUE,
the most look and feels will not provide the scrolling to the right/down.
Some look and feels implement custom scrolling behavior
and ignore this property.
Parameters:
unitIncrement | | the unit increment |
See also:
getUnitIncrement
@BeanProperty(bound=false, preferred=true, description="The scrollbar\'s current value.")
public
void setValue (
int value)
@BeanProperty(bound=false, preferred=true, description="The amount of the view that is currently visible.")
public
void setVisibleAmount (
int extent)