javax.swing

Class JTabbedPane.AccessibleJTabbedPane

protected class JTabbedPane.AccessibleJTabbedPane extends JComponent.AccessibleJComponent implements AccessibleSelection, ChangeListener

Accessibility support for JTabbedPane.
Constructor Summary
AccessibleJTabbedPane()
Creates a new AccessibleJTabbedPane object.
Method Summary
voidaddAccessibleSelection(int i)
Selects the specified tab.
voidclearAccessibleSelection()
Does nothing - it makes no sense to clear the selection for a tabbed pane, since one tab must always be selected.
AccessiblegetAccessibleAt(Point p)
Returns the accessible child component at the specified coordinates.
AccessiblegetAccessibleChild(int i)
Returns the accessible child component at the specified index.
intgetAccessibleChildrenCount()
Returns the number of accessible child components of the JTabbedPane.
AccessibleRolegetAccessibleRole()
Returns the accessible role of the JTabbedPane, which is {@link AccessibleRole#PAGE_TAB_LIST}.
AccessibleSelectiongetAccessibleSelection()
Returns the current selection state of the JTabbedPane as AccessibleSelection object.
AccessiblegetAccessibleSelection(int i)
Returns the selected tab, or null if there is no selection.
intgetAccessibleSelectionCount()
Returns the number of selected child components of the JTabbedPane.
booleanisAccessibleChildSelected(int i)
Returns true if the specified child is selected, and false otherwise.
voidremoveAccessibleSelection(int i)
Does nothing - it makes no sense to remove a selection for a tabbed pane, since one tab must always be selected.
voidselectAllAccessibleSelection()
Does nothing - it makes no sense to select all for a tabbed pane, since only one tab can be selected at a time.
voidstateChanged(ChangeEvent e)
Receives notification when the selection state of the JTabbedPane changes and fires appropriate property change events to interested listeners.

Constructor Detail

AccessibleJTabbedPane

public AccessibleJTabbedPane()
Creates a new AccessibleJTabbedPane object.

Method Detail

addAccessibleSelection

public void addAccessibleSelection(int i)
Selects the specified tab.

Parameters: i the index of the item to select.

clearAccessibleSelection

public void clearAccessibleSelection()
Does nothing - it makes no sense to clear the selection for a tabbed pane, since one tab must always be selected.

See Also: AccessibleJTabbedPane

getAccessibleAt

public Accessible getAccessibleAt(Point p)
Returns the accessible child component at the specified coordinates. If there is no child component at this location, then return the currently selected tab.

Parameters: p the coordinates at which to look up the child component

Returns: the accessible child component at the specified coordinates or the currently selected tab if there is no child component at this location

getAccessibleChild

public Accessible getAccessibleChild(int i)
Returns the accessible child component at the specified index.

Parameters: i the index of the child component to fetch

Returns: the accessible child component at the specified index

getAccessibleChildrenCount

public int getAccessibleChildrenCount()
Returns the number of accessible child components of the JTabbedPane.

Returns: the number of accessible child components of the JTabbedPane

getAccessibleRole

public AccessibleRole getAccessibleRole()
Returns the accessible role of the JTabbedPane, which is {@link AccessibleRole#PAGE_TAB_LIST}.

Returns: the accessible role of the JTabbedPane

getAccessibleSelection

public AccessibleSelection getAccessibleSelection()
Returns the current selection state of the JTabbedPane as AccessibleSelection object.

Returns: the current selection state of the JTabbedPane

getAccessibleSelection

public Accessible getAccessibleSelection(int i)
Returns the selected tab, or null if there is no selection.

Parameters: i the selection index (ignored here).

Returns: The selected tab, or null.

getAccessibleSelectionCount

public int getAccessibleSelectionCount()
Returns the number of selected child components of the JTabbedPane. The reference implementation appears to return 1 always and we do the same.

Returns: 1

isAccessibleChildSelected

public boolean isAccessibleChildSelected(int i)
Returns true if the specified child is selected, and false otherwise.

Parameters: i the child index.

Returns: A boolean.

removeAccessibleSelection

public void removeAccessibleSelection(int i)
Does nothing - it makes no sense to remove a selection for a tabbed pane, since one tab must always be selected.

Parameters: i the item index.

See Also: AccessibleJTabbedPane

selectAllAccessibleSelection

public void selectAllAccessibleSelection()
Does nothing - it makes no sense to select all for a tabbed pane, since only one tab can be selected at a time.

See Also: AccessibleJTabbedPane

stateChanged

public void stateChanged(ChangeEvent e)
Receives notification when the selection state of the JTabbedPane changes and fires appropriate property change events to interested listeners.

Parameters: e the change event describing the change