Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
javax.accessibility.AccessibleContext
java.awt.Component.AccessibleAWTComponent
java.awt.Container.AccessibleAWTContainer
javax.swing.JComponent.AccessibleJComponent
javax.swing.JTabbedPane.AccessibleJTabbedPane
protected class JTabbedPane.AccessibleJTabbedPane
extends JComponent.AccessibleJComponent
implements AccessibleSelection, ChangeListener
JTabbedPane
.
Nested Class Summary |
Nested classes/interfaces inherited from class javax.swing.JComponent.AccessibleJComponent | |
JComponent.AccessibleJComponent.AccessibleContainerHandler , JComponent.AccessibleJComponent.AccessibleFocusHandler |
Nested classes/interfaces inherited from class java.awt.Container.AccessibleAWTContainer | |
Container.AccessibleAWTContainer.AccessibleContainerHandler |
Nested classes/interfaces inherited from class java.awt.Component.AccessibleAWTComponent | |
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler , Component.AccessibleAWTComponent.AccessibleAWTFocusHandler |
Field Summary |
Fields inherited from class javax.swing.JComponent.AccessibleJComponent | |
accessibleContainerHandler , accessibleFocusHandler |
Fields inherited from class java.awt.Container.AccessibleAWTContainer | |
accessibleContainerHandler |
Fields inherited from class java.awt.Component.AccessibleAWTComponent | |
accessibleAWTComponentHandler , accessibleAWTFocusHandler |
Constructor Summary | |
|
Method Summary | |
void |
|
void |
|
Accessible |
|
Accessible |
|
int |
|
AccessibleRole |
|
AccessibleSelection |
|
Accessible |
|
int |
|
boolean |
|
void |
|
void |
|
void |
|
Methods inherited from class java.awt.Container.AccessibleAWTContainer | |
getAccessibleAt , getAccessibleChild , getAccessibleChildrenCount |
Methods inherited from class java.lang.Object | |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
public void addAccessibleSelection(int i)
Selects the specified tab.
- Specified by:
- addAccessibleSelection in interface AccessibleSelection
- Parameters:
i
- the index of the item to select.
public void clearAccessibleSelection()
Does nothing - it makes no sense to clear the selection for a tabbed pane, since one tab must always be selected.
- Specified by:
- clearAccessibleSelection in interface AccessibleSelection
- See Also:
addAccessibleSelection(int)
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.
- Specified by:
- getAccessibleAt in interface AccessibleComponent
- Overrides:
- getAccessibleAt in interface Container.AccessibleAWTContainer
- 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
public Accessible getAccessibleChild(int i)
Returns the accessible child component at the specified index.
- Overrides:
- getAccessibleChild in interface JComponent.AccessibleJComponent
- Parameters:
i
- the index of the child component to fetch
- Returns:
- the accessible child component at the specified index
public int getAccessibleChildrenCount()
Returns the number of accessible child components of theJTabbedPane
.
- Overrides:
- getAccessibleChildrenCount in interface JComponent.AccessibleJComponent
- Returns:
- the number of accessible child components of the
JTabbedPane
public AccessibleRole getAccessibleRole()
Returns the accessible role of theJTabbedPane
, which isAccessibleRole.PAGE_TAB_LIST
.
- Overrides:
- getAccessibleRole in interface JComponent.AccessibleJComponent
- Returns:
- the accessible role of the
JTabbedPane
public AccessibleSelection getAccessibleSelection()
Returns the current selection state of theJTabbedPane
as AccessibleSelection object.
- Overrides:
- getAccessibleSelection in interface AccessibleContext
- Returns:
- the current selection state of the
JTabbedPane
public Accessible getAccessibleSelection(int i)
Returns the selected tab, ornull
if there is no selection.
- Specified by:
- getAccessibleSelection in interface AccessibleSelection
- Parameters:
i
- the selection index (ignored here).
- Returns:
- The selected tab, or
null
.
public int getAccessibleSelectionCount()
Returns the number of selected child components of theJTabbedPane
. The reference implementation appears to return1
always and we do the same.
- Specified by:
- getAccessibleSelectionCount in interface AccessibleSelection
- Returns:
1
public boolean isAccessibleChildSelected(int i)
Returnstrue
if the specified child is selected, andfalse
otherwise.
- Specified by:
- isAccessibleChildSelected in interface AccessibleSelection
- Parameters:
i
- the child index.
- Returns:
- A boolean.
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.
- Specified by:
- removeAccessibleSelection in interface AccessibleSelection
- Parameters:
i
- the item index.
- See Also:
addAccessibleSelection(int)
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.
- Specified by:
- selectAllAccessibleSelection in interface AccessibleSelection
- See Also:
addAccessibleSelection(int)
public void stateChanged(ChangeEvent e)
Receives notification when the selection state of theJTabbedPane
changes and fires appropriate property change events to interested listeners.
- Specified by:
- stateChanged in interface ChangeListener
- Parameters:
e
- the change event describing the change