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.


Class Index

 o JSlider.ModelListener

Variable Index

 o changeEvent
 o changeListener
 o isOpaque
 o majorTickSpacing
 o minorTickSpacing
 o orientation
 o paintTicks
 o sliderModel

Constructor Index

 o JSlider()
 o JSlider(int, int, int, int)

Method Index

 o addChangeListener(ChangeListener)
Adds a ChangeListener to the button.
 o createChangeListener()
 o fireStateChanged()
 o getAccessibleRole()
Get the role of this object.
 o getAccessibleStateSet()
Get the state set of this object.
 o getAccessibleValue()
Get the accessible value of this object.
 o getExtent()
 o getMajorTickSpacing()
 o getMaximum()
 o getMaximumAccessibleValue()
Get the maximum accessible value of this object.
 o getMinimum()
 o getMinimumAccessibleValue()
Get the minimum accessible value of this object.
 o getMinorTickSpacing()
 o getModel()
 o getOrientation()
 o getPaintTicks()
 o getUI()
 o getUIClassID()
 o getValue()
 o getValueIsAdjusting()
 o isOpaque()
Returns true if this component is completely opaque.
 o removeChangeListener(ChangeListener)
Removes a ChangeListener from the button.
 o setAccessibleValue(Number)
Set the value of this object as a Number.
 o setExtent(int)
 o setMajorTickSpacing(int)
 o setMaximum(int)
 o setMinimum(int)
 o setMinorTickSpacing(int)
 o setModel(BoundedRangeModel)
 o setOpaque(boolean)
 o setOrientation(int)
 o setPaintTicks(boolean)
 o setUI(SliderUI)
 o setValue(int)
 o setValueIsAdjusting(boolean)
 o toString()
Returns a string representation of this component and its values.
 o updateUI()
Called to replace the UI with the latest version from the default UIFactory.

Variables

 o sliderModel
protected BoundedRangeModel sliderModel
 o majorTickSpacing
protected int majorTickSpacing
 o minorTickSpacing
protected int minorTickSpacing
 o paintTicks
protected boolean paintTicks
 o orientation
protected int orientation
 o isOpaque
protected boolean isOpaque
 o changeListener
protected ChangeListener changeListener
 o changeEvent
protected transient ChangeEvent changeEvent

Constructors

 o JSlider
public JSlider()
 o JSlider
public JSlider(int orientation,
               int minimum,
               int maximum,
               int value)

Methods

 o getUI
public SliderUI getUI()
 o setUI
public void setUI(SliderUI ui)
 o updateUI
public void updateUI()
Called to replace the UI with the latest version from the default UIFactory.

Overrides:
updateUI in class JComponent
 o getUIClassID
public String getUIClassID()
Returns:
"SliderUI"
Overrides:
getUIClassID in class JComponent
See Also:
getUIClassID, getUI
 o createChangeListener
protected ChangeListener createChangeListener()
 o addChangeListener
public void addChangeListener(ChangeListener l)
Adds a ChangeListener to the button.

 o removeChangeListener
public void removeChangeListener(ChangeListener l)
Removes a ChangeListener from the button.

 o fireStateChanged
protected void fireStateChanged()
 o getModel
public BoundedRangeModel getModel()
 o setModel
public void setModel(BoundedRangeModel newModel)
 o getValue
public int getValue()
 o getExtent
public int getExtent()
 o getMinimum
public int getMinimum()
 o getMaximum
public int getMaximum()
 o getValueIsAdjusting
public boolean getValueIsAdjusting()
 o setValue
public void setValue(int n)
 o setExtent
public void setExtent(int n)
 o setMinimum
public void setMinimum(int n)
 o setMaximum
public void setMaximum(int n)
 o setValueIsAdjusting
public void setValueIsAdjusting(boolean b)
 o getMajorTickSpacing
public int getMajorTickSpacing()
 o getMinorTickSpacing
public int getMinorTickSpacing()
 o getOrientation
public int getOrientation()
 o getPaintTicks
public boolean getPaintTicks()
 o setMajorTickSpacing
public void setMajorTickSpacing(int n)
 o setMinorTickSpacing
public void setMinorTickSpacing(int n)
 o setOrientation
public void setOrientation(int n)
 o setPaintTicks
public void setPaintTicks(boolean b)
 o toString
public String toString()
Returns a string representation of this component and its values.

Overrides:
toString in class Component
 o isOpaque
public boolean isOpaque()
Returns true if this component is completely opaque.

Overrides:
isOpaque in class JComponent
 o setOpaque
public void setOpaque(boolean b)
 o 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
 o 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
 o getAccessibleValue
public Number getAccessibleValue()
Get the accessible value of this object.

Returns:
The current value of this object.
Overrides:
getAccessibleValue in class JComponent
 o 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
 o getMinimumAccessibleValue
public Number getMinimumAccessibleValue()
Get the minimum accessible value of this object.

Returns:
The minimum value of this object.
Overrides:
getMinimumAccessibleValue in class JComponent
 o 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