javax.swing

Class JSlider.AccessibleJSlider

protected class JSlider.AccessibleJSlider extends JComponent.AccessibleJComponent implements AccessibleValue

Provides the accessibility features for the JSlider component.
Constructor Summary
protected AccessibleJSlider()
Creates a new AccessibleJSlider instance.
Method Summary
AccessibleRolegetAccessibleRole()
Returns the accessible role for the JSlider component.
AccessibleStateSetgetAccessibleStateSet()
Returns a set containing the current state of the JSlider component.
AccessibleValuegetAccessibleValue()
Returns an object that provides access to the current, minimum and maximum values for the JSlider.
NumbergetCurrentAccessibleValue()
Returns the current value of the JSlider component, as an Integer.
NumbergetMaximumAccessibleValue()
Returns the maximum value of the JSlider component, as an Integer.
NumbergetMinimumAccessibleValue()
Returns the minimum value of the JSlider component, as an Integer.
booleansetCurrentAccessibleValue(Number value)
Sets the current value of the JSlider component and sends a PropertyChangeEvent (with the property name AccessibleContext#ACCESSIBLE_VALUE_PROPERTY) to all registered listeners.

Constructor Detail

AccessibleJSlider

protected AccessibleJSlider()
Creates a new AccessibleJSlider instance.

Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Returns the accessible role for the JSlider component.

Returns: AccessibleRole#SLIDER.

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Returns a set containing the current state of the JSlider component.

Returns: The accessible state set.

getAccessibleValue

public AccessibleValue getAccessibleValue()
Returns an object that provides access to the current, minimum and maximum values for the JSlider. Since this class implements AccessibleValue, it returns itself.

Returns: The accessible value.

getCurrentAccessibleValue

public Number getCurrentAccessibleValue()
Returns the current value of the JSlider component, as an Integer.

Returns: The current value of the JSlider component.

getMaximumAccessibleValue

public Number getMaximumAccessibleValue()
Returns the maximum value of the JSlider component, as an Integer.

Returns: The maximum value of the JSlider component.

getMinimumAccessibleValue

public Number getMinimumAccessibleValue()
Returns the minimum value of the JSlider component, as an Integer.

Returns: The minimum value of the JSlider component.

setCurrentAccessibleValue

public boolean setCurrentAccessibleValue(Number value)
Sets the current value of the JSlider component and sends a PropertyChangeEvent (with the property name AccessibleContext#ACCESSIBLE_VALUE_PROPERTY) to all registered listeners. If the supplied value is null, this method does nothing and returns false.

Parameters: value the new slider value (null permitted).

Returns: true if the slider value is updated, and false otherwise.