Java Reference
In-Depth Information
JSlider Properties
After you've created a JSlider , you may want to modify its underlying data model. As is the
case with JScrollBar , you can get the model with the public BoundedRangeModel getModel()
method, and then modify the model directly. You can also directly call the methods of the
component:
setValue(int newValue) , setExtent(int newValue) , setMinimum(int newValue)
setMaximum(int newValue)
As with JScrollBar , these methods act as proxies and redirect any calls to the equivalent
model method.
Table 12-3 shows the 19 properties of JSlider .
Table 12-3. JSlider Properties
Property Name
Data Type
Access
accessibleContext
AccessibleContext
Read-only
changeListeners
ChangeListener[ ]
Read-only
extent
int
Read-write
inverted
boolean
Read-write bound
labelTable
Dictionary
Read-write bound
majorTickSpacing
int
Read-write bound
maximum
int
Read-write bound
minimum
int
Read-write bound
minorTickSpacing
int
Read-write bound
model
BoundedRangeModel
Read-write bound
orientation
int
Read-write bound
paintLabels
boolean
Read-write bound
paintTicks
boolean
Read-write bound
paintTrack
boolean
Read-write bound
snapToTicks
boolean
Read-write bound
UI
SliderUI
Read-write bound
UIClassID
String
Read-only
value
int
Read-write
valueIsAdjusting
boolean
Read-write bound
Search WWH ::




Custom Search