javax.swing

Class JScrollBar.AccessibleJScrollBar

protected class JScrollBar.AccessibleJScrollBar extends JComponent.AccessibleJComponent implements AccessibleValue

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

Constructor Detail

AccessibleJScrollBar

protected AccessibleJScrollBar()
Creates a new AccessibleJScrollBar instance.

Method Detail

getAccessibleRole

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

Returns: {@link AccessibleRole#SCROLL_BAR}.

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Returns a set containing the current state of the {@link JScrollBar} component.

Returns: The accessible state set.

getAccessibleValue

public AccessibleValue getAccessibleValue()
Returns an object that provides access to the current, minimum and maximum values.

Returns: The accessible value.

getCurrentAccessibleValue

public Number getCurrentAccessibleValue()
Returns the current value of the {@link JScrollBar} component, as an {@link Integer}.

Returns: The current value of the {@link JScrollBar} component.

getMaximumAccessibleValue

public Number getMaximumAccessibleValue()
Returns the maximum value of the {@link JScrollBar} component, as an {@link Integer}.

Returns: The maximum value of the {@link JScrollBar} component.

getMinimumAccessibleValue

public Number getMinimumAccessibleValue()
Returns the minimum value of the {@link JScrollBar} component, as an {@link Integer}.

Returns: The minimum value of the {@link JScrollBar} component.

setCurrentAccessibleValue

public boolean setCurrentAccessibleValue(Number value)
Sets the current value of the {@link JScrollBar} component and sends a {@link PropertyChangeEvent} (with the property name {@link 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.