void | addChangeListener(ChangeListener listener)- Registers a listener with the slider so that it will receive
ChangeEvent notifications.
|
protected ChangeListener | createChangeListener()- Creates a
ChangeListener that is added to the slider's model and
forwards change events generated by the model to the listeners that are
registered with the JSlider (by calling the
fireStateChanged() method).
|
Hashtable<K,V> | createStandardLabels(int increment)- Creates a hashtable of
(Integer, JLabel) pairs that can be
used as a label table for this slider.
|
Hashtable<K,V> | createStandardLabels(int increment, int start)- Creates a hashtable of
(Integer, JLabel) pairs that can be
used as a label table for this slider.
|
protected void | fireStateChanged()- Sends a
ChangeEvent to all registered listeners, with this slider
as the source.
|
AccessibleContext | getAccessibleContext()- Returns the object that provides accessibility features for this
JSlider component.
|
ChangeListener[] | getChangeListeners()- Returns an array containing all the
ChangeListener instances
registered with this slider.
|
int | getExtent()- Returns the slider's extent value, obtained from the slider's model.
|
boolean | getInverted()- Returns the flag that controls whether or not the value scale for the
slider is inverted (the default value is
false).
|
Dictionary<K,V> | getLabelTable()- Returns the label table for the slider.
|
int | getMajorTickSpacing()- Returns the distance between major tick marks along the slider's value
scale.
|
int | getMaximum()- Returns the slider's maximum value (obtained from the slider's model).
|
int | getMinimum()- Returns the minimum value of the slider (from the slider's model).
|
int | getMinorTickSpacing()- Returns the distance between minor tick marks along the slider's value
scale.
|
BoundedRangeModel | getModel()- Returns the slider's model, which stores the minimum, maximum and current
values.
|
int | getOrientation()- Returns the orientation of the slider, either
SwingConstants.HORIZONTAL
or SwingConstants.VERTICAL.
|
boolean | getPaintLabels()- Returns the flag that controls whether or not labels are painted for the
tick marks along the slider.
|
boolean | getPaintTicks()- Returns the flag that controls whether or not tick marks are painted along
the slider's value scale.
|
boolean | getPaintTrack()- Returns the flag that controls whether or not the track is painted.
|
boolean | getSnapToTicks()- Returns the flag that controls whether the slider thumb will snap to ticks.
|
SliderUI | getUI()- Returns the slider's UI delegate.
|
String | getUIClassID()- Returns the suffix (
"SliderUI" in this case) used to
determine the class name for a UI delegate that can provide the look and
feel for a JSlider.
|
int | getValue()- Returns the slider's value (from the slider's model).
|
boolean | getValueIsAdjusting()- Returns the
valueIsAdjusting flag from the slider's model.
|
protected String | paramString()- Returns an implementation-dependent string describing the attributes of
this
JSlider.
|
void | removeChangeListener(ChangeListener listener)- Removes a listener from this slider so that it will no longer receive
ChangeEvent notifications from the slider.
|
void | setExtent(int extent)- Sets the slider's extent value and sends a
ChangeEvent to all
registered listeners.
|
void | setInverted(boolean inverted)- Sets the flag that controls whether or not the value scale for the
slider is inverted and, if the new flag value is different to the old flag
value, sends a
PropertyChangeEvent to all registered listeners.
|
void | setLabelTable(Dictionary<K,V> table)- Sets the table of labels for the slider and sends a
PropertyChangeEvent (with the property name "labelTable") to all
registered listeners.
|
void | setMajorTickSpacing(int spacing)- Sets the distance between major tick marks along the slider's value scale,
and sends a
PropertyChangeEvent (with the property name
"majorTickSpacing") to all registered listeners.
|
void | setMaximum(int maximum)- Sets the maximum value of the slider and fires a
PropertyChangeEvent (with the property name "maximum") to all
registered listeners.
|
void | setMinimum(int minimum)- Sets the minimum value of the slider and fires a
PropertyChangeEvent (with the property name "minimum") to all
registered listeners.
|
void | setMinorTickSpacing(int spacing)- Sets the distance between minor tick marks along the slider's value scale,
and sends a
PropertyChangeEvent (with the property name
"minorTickSpacing") to all registered listeners.
|
void | setModel(BoundedRangeModel model)- Sets the slider's model and sends a
PropertyChangeEvent (with the
property name "model") to all registered listeners.
|
void | setOrientation(int orientation)- Sets the orientation for the slider and sends a
PropertyChangeEvent (with the property name "orientation") to all
registered listeners.
|
void | setPaintLabels(boolean paint)- Sets the flag that controls whether or not labels are painted for the
tick marks along the slider and sends a
PropertyChangeEvent (with
the property name "paintLabels") to all registered listeners.
|
void | setPaintTicks(boolean paint)- Sets the flag that controls whether or not tick marks are painted along
the slider's value scale, and sends a
PropertyChangeEvent (with
the property name "paintTicks") to all registered listeners.
|
void | setPaintTrack(boolean paint)- Sets the flag that controls whether or not the track is painted, and
sends a
PropertyChangeEvent (for the "paintTrack" property) to all
registered listeners.
|
void | setSnapToTicks(boolean snap)- Sets the flag that controls whether the slider thumb will snap to ticks
and sends a
PropertyChangeEvent (with the property name
'snapToTicks') to all registered listeners.
|
void | setUI(SliderUI ui)- Sets the slider's UI delegate.
|
void | setValue(int value)- Sets the slider's value and sends a
ChangeEvent to all
registered listeners.
|
void | setValueIsAdjusting(boolean adjusting)- Sets the
valueIsAdjusting flag in the slider's model, and
sends a ChangeEvent to all registered listeners.
|
protected void | updateLabelUIs()- Resets the UI delegates for the labels in the
labelTable to
the default for the current look and feel.
|
void | updateUI()- Sets this slider's UI delegate to the default (obtained from the
UIManager) for the current look and feel.
|