class. It provides an implementation of the
Java Accessibility API appropriate to tabbed pane user-interface
elements.
Method from javax.swing.JTabbedPane$AccessibleJTabbedPane Detail: |
public void addAccessibleSelection(int i) {
setSelectedIndex(i);
}
|
public void clearAccessibleSelection() {
// can't do
}
|
public Accessible getAccessibleAt(Point p) {
int tab = ((TabbedPaneUI) ui).tabForCoordinate(JTabbedPane.this,
p.x, p.y);
if (tab == -1) {
tab = getSelectedIndex();
}
return getAccessibleChild(tab);
}
Returns the Accessible child contained at
the local coordinate Point , if one exists.
Otherwise returns the currently selected tab. |
public Accessible getAccessibleChild(int i) {
if (i < 0 || i >= getTabCount()) {
return null;
}
return pages.get(i);
}
Return the specified Accessible child of the object. |
public int getAccessibleChildrenCount() {
return getTabCount();
}
Returns the number of accessible children in the object. |
public String getAccessibleName() {
if (accessibleName != null) {
return accessibleName;
}
String cp = (String)getClientProperty(AccessibleContext.ACCESSIBLE_NAME_PROPERTY);
if (cp != null) {
return cp;
}
int index = getSelectedIndex();
if (index >= 0) {
return pages.get(index).getAccessibleName();
}
return super.getAccessibleName();
}
Returns the accessible name of this object, or {@code null} if
there is no accessible name. |
public AccessibleRole getAccessibleRole() {
return AccessibleRole.PAGE_TAB_LIST;
}
Get the role of this object. |
public AccessibleSelection getAccessibleSelection() {
return this;
}
Gets the AccessibleSelection associated with
this object. In the implementation of the Java
Accessibility API for this class,
returns this object, which is responsible for implementing the
AccessibleSelection interface on behalf of itself. |
public Accessible getAccessibleSelection(int i) {
int index = getSelectedIndex();
if (index == -1) {
return null;
}
return pages.get(index);
}
|
public int getAccessibleSelectionCount() {
return 1;
}
|
public boolean isAccessibleChildSelected(int i) {
return (i == getSelectedIndex());
}
|
public void removeAccessibleSelection(int i) {
// can't do
}
|
public void selectAllAccessibleSelection() {
// can't do
}
|
public void stateChanged(ChangeEvent e) {
Object o = e.getSource();
firePropertyChange(AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY,
null, o);
}
|