Java Reference
In-Depth Information
JScrollBar Properties
After you've created a JScrollBar , it may become necessary to modify its underlying data
model. You can get the model with the public BoundedRangeModel getModel() method, and
then modify the model directly. More likely, you would just call the appropriate methods of the
component:
setValue(int newValue) , setExtent(int newValue) , setMinimum(int newValue)
setMaximum(int newValue)
These methods act as proxies and redirect any calls to the equivalent model method.
Caution Although supported, it's not recommended that you modify a JScrollBar 's orientation after
displaying the component. This could seriously diminish the user's satisfaction and encourage the user to find
a solution from another vendor!
In addition to the data model properties, Table 12-1 shows the 16 properties of JScrollBar .
Table 12-1. JScrollBar Properties
Property Name
Data Type
Access
accessibleContext
AccessibleContext
Read-only
adjustmentListeners
AdjustmentListener[ ]
Read-only
blockIncrement
int
Read-write bound
enabled
boolean
Write-only
maximum
int
Read-write
maximumSize
Dimension
Read-only
minimum
int
Read-write
minimumSize
Dimension
Read-only
model
BoundedRangeModel
Read-write bound
orientation
int
Read-write bound
UI
ScrollBarUI
Read-write bound
UIClassID
String
Read-only
unitIncrement
int
Read-write bound
value
int
Read-write bound
valueIsAdjusting
boolean
Read-write bound
visibleAmount
int
Read-write
 
Search WWH ::




Custom Search