All Packages Class Hierarchy This Package Previous Next Index
Class java.awt.swing.JSlider
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.swing.JComponent
|
+----java.awt.swing.JSlider
- public class JSlider
- extends JComponent
- implements SwingConstants, Accessible
A control that lets the user select a value from a bounded interval.
MajorTickSpacing and MinorTickSpacing are the number of pixels between
tick marks.
JSlider.ModelListener-
changeEvent-
changeListener-
isOpaque-
majorTickSpacing-
minorTickSpacing-
orientation-
paintTicks-
sliderModel-
JSlider()
-
JSlider(int, int, int, int)
-
addChangeListener(ChangeListener)
- Adds a ChangeListener to the button.
createChangeListener()
-
fireStateChanged()
-
getAccessibleRole()
- Get the role of this object.
getAccessibleStateSet()
- Get the state set of this object.
getAccessibleValue()
- Get the accessible value of this object.
getExtent()
-
getMajorTickSpacing()
-
getMaximum()
-
getMaximumAccessibleValue()
- Get the maximum accessible value of this object.
getMinimum()
-
getMinimumAccessibleValue()
- Get the minimum accessible value of this object.
getMinorTickSpacing()
-
getModel()
-
getOrientation()
-
getPaintTicks()
-
getUI()
-
getUIClassID()
-
getValue()
-
getValueIsAdjusting()
-
isOpaque()
- Returns true if this component is completely opaque.
removeChangeListener(ChangeListener)
- Removes a ChangeListener from the button.
setAccessibleValue(Number)
- Set the value of this object as a Number.
setExtent(int)
-
setMajorTickSpacing(int)
-
setMaximum(int)
-
setMinimum(int)
-
setMinorTickSpacing(int)
-
setModel(BoundedRangeModel)
-
setOpaque(boolean)
-
setOrientation(int)
-
setPaintTicks(boolean)
-
setUI(SliderUI)
-
setValue(int)
-
setValueIsAdjusting(boolean)
-
toString()
- Returns a string representation of this component and its values.
updateUI()
- Called to replace the UI with the latest version from the
default UIFactory.
sliderModel
protected BoundedRangeModel sliderModel
majorTickSpacing
protected int majorTickSpacing
minorTickSpacing
protected int minorTickSpacing
paintTicks
protected boolean paintTicks
orientation
protected int orientation
isOpaque
protected boolean isOpaque
changeListener
protected ChangeListener changeListener
changeEvent
protected transient ChangeEvent changeEvent
JSlider
public JSlider()
JSlider
public JSlider(int orientation,
int minimum,
int maximum,
int value)
getUI
public SliderUI getUI()
setUI
public void setUI(SliderUI ui)
updateUI
public void updateUI()
- Called to replace the UI with the latest version from the
default UIFactory.
- Overrides:
- updateUI in class JComponent
getUIClassID
public String getUIClassID()
- Returns:
- "SliderUI"
- Overrides:
- getUIClassID in class JComponent
- See Also:
- getUIClassID, getUI
createChangeListener
protected ChangeListener createChangeListener()
addChangeListener
public void addChangeListener(ChangeListener l)
- Adds a ChangeListener to the button.
removeChangeListener
public void removeChangeListener(ChangeListener l)
- Removes a ChangeListener from the button.
fireStateChanged
protected void fireStateChanged()
getModel
public BoundedRangeModel getModel()
setModel
public void setModel(BoundedRangeModel newModel)
getValue
public int getValue()
getExtent
public int getExtent()
getMinimum
public int getMinimum()
getMaximum
public int getMaximum()
getValueIsAdjusting
public boolean getValueIsAdjusting()
setValue
public void setValue(int n)
setExtent
public void setExtent(int n)
setMinimum
public void setMinimum(int n)
setMaximum
public void setMaximum(int n)
setValueIsAdjusting
public void setValueIsAdjusting(boolean b)
getMajorTickSpacing
public int getMajorTickSpacing()
getMinorTickSpacing
public int getMinorTickSpacing()
getOrientation
public int getOrientation()
getPaintTicks
public boolean getPaintTicks()
setMajorTickSpacing
public void setMajorTickSpacing(int n)
setMinorTickSpacing
public void setMinorTickSpacing(int n)
setOrientation
public void setOrientation(int n)
setPaintTicks
public void setPaintTicks(boolean b)
toString
public String toString()
- Returns a string representation of this component and its values.
- Overrides:
- toString in class Component
isOpaque
public boolean isOpaque()
- Returns true if this component is completely opaque.
- Overrides:
- isOpaque in class JComponent
setOpaque
public void setOpaque(boolean b)
getAccessibleStateSet
public AccessibleStateSet getAccessibleStateSet()
- Get the state set of this object.
- Returns:
- an instance of AccessibleState containing the current state
of the object
- Overrides:
- getAccessibleStateSet in class JComponent
- See Also:
- AccessibleState
getAccessibleRole
public AccessibleRole getAccessibleRole()
- Get the role of this object.
- Returns:
- an instance of AccessibleRole describing the role of the object
- Overrides:
- getAccessibleRole in class JComponent
getAccessibleValue
public Number getAccessibleValue()
- Get the accessible value of this object.
- Returns:
- The current value of this object.
- Overrides:
- getAccessibleValue in class JComponent
setAccessibleValue
public boolean setAccessibleValue(Number n)
- Set the value of this object as a Number.
- Returns:
- True if the value was set.
- Overrides:
- setAccessibleValue in class JComponent
getMinimumAccessibleValue
public Number getMinimumAccessibleValue()
- Get the minimum accessible value of this object.
- Returns:
- The minimum value of this object.
- Overrides:
- getMinimumAccessibleValue in class JComponent
getMaximumAccessibleValue
public Number getMaximumAccessibleValue()
- Get the maximum accessible value of this object.
- Returns:
- The maximum value of this object.
- Overrides:
- getMaximumAccessibleValue in class JComponent
All Packages Class Hierarchy This Package Previous Next Index
Submit a bug or feature