java.lang.Object
javax.accessibility.AccessibleContext
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
- All Implemented Interfaces:
Accessible,AccessibleAction,AccessibleComponent,AccessibleSelection
- Enclosing class:
JTree.AccessibleJTree
protected class JTree.AccessibleJTree.AccessibleJTreeNode
extends AccessibleContext
implements Accessible, AccessibleComponent, AccessibleSelection, AccessibleAction
This class implements accessibility support for the
JTree child. It provides an implementation of the
Java Accessibility API appropriate to tree nodes.-
Field Summary
Fields declared in class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_COMPONENT_BOUNDS_CHANGED, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_HYPERTEXT_OFFSET, ACCESSIBLE_INVALIDATE_CHILDREN, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_ATTRIBUTES_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleNameFields declared in interface javax.accessibility.AccessibleAction
CLICK, DECREMENT, INCREMENT, TOGGLE_EXPAND, TOGGLE_POPUP -
Constructor Summary
ConstructorsConstructorDescriptionAccessibleJTreeNode(JTree t, TreePath p, Accessible ap) Constructs an AccessibleJTreeNode -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAccessibleSelection(int i) Adds the specified selected item in the object to the object's selection.voidAdds the specified focus listener to receive focus events from this component.voidAdd a PropertyChangeListener to the listener list.voidClears the selection in the object, so that nothing in the object is selected.booleanChecks whether the specified point is within this object's bounds, where the point's x and y coordinates are defined to be relative to the coordinate system of the object.booleandoAccessibleAction(int i) Perform the specified Action on the tree node.Get the AccessibleAction associated with this object.intReturns the number of accessible actions available in this tree node.Return a description of the specified action of the tree node.Returns theAccessiblechild, if one exists, contained at the local coordinatePoint.getAccessibleChild(int i) Return the specified Accessible child of the object.intReturns the number of accessible children in the object.Get the AccessibleComponent associated with this object.Get the AccessibleContext associated with this tree node.Get the accessible description of this object.intGet the index of this object in its accessible parent.Get the accessible name of this object.Get the Accessible parent of this object.Get the role of this object.Get the AccessibleSelection associated with this object if one exists.getAccessibleSelection(int i) Returns an Accessible representing the specified selected item in the object.intReturns the number of items currently selected.Get the state set of this object.Get the AccessibleText associated with this object if one exists.Get the AccessibleValue associated with this object if one exists.Get the background color of this object.Gets the bounds of this object in the form of aRectangleobject.Gets the cursor of this object.getFont()Gets the font of this object.Gets theFontMetricsof this object.Get the foreground color of this object.Gets the locale of the component.Gets the location of the object relative to the parent in the form of a point specifying the object's top-left corner in the screen's coordinate space.protected PointReturns the relative location of the nodeReturns the location of the object on the screen.getSize()Returns the size of this object in the form of aDimensionobject.booleanisAccessibleChildSelected(int i) Returns true if the current child of this object is selected.booleanDetermines if the object is enabled.booleanReturns whether this object can accept focus or not.booleanDetermines if the object is showing.booleanDetermines if the object is visible.voidremoveAccessibleSelection(int i) Removes the specified selected item in the object from the object's selection.voidRemoves the specified focus listener so it no longer receives focus events from this component.voidRemove a PropertyChangeListener from the listener list.voidRequests focus for this object.voidCauses every selected item in the object to be selected if the object supports multiple selections.voidSet the accessible description of this object.voidSet the localized accessible name of this object.voidSet the background color of this object.voidSets the bounds of this object in the form of aRectangleobject.voidSets the cursor of this object.voidsetEnabled(boolean b) Sets the enabled state of the object.voidSets the font of this object.voidSets the foreground color of this object.voidsetLocation(Point p) Sets the location of the object relative to the parent.voidResizes this object so that it has width and height.voidsetVisible(boolean b) Sets the visible state of the object.Methods declared in class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleEditableText, getAccessibleIcon, getAccessibleRelationSet, getAccessibleTable, setAccessibleParent
-
Constructor Details
-
AccessibleJTreeNode
Constructs an AccessibleJTreeNode- Parameters:
t- an instance ofJTreep- an instance ofTreePathap- an instance ofAccessible- Since:
- 1.4
-
-
Method Details
-
getAccessibleContext
Get the AccessibleContext associated with this tree node. In the implementation of the Java Accessibility API for this class, return this object, which is its own AccessibleContext.- Specified by:
getAccessibleContextin interfaceAccessible- Returns:
- this object
-
getAccessibleName
Get the accessible name of this object.- Overrides:
getAccessibleNamein classAccessibleContext- Returns:
- the localized name of the object; null if this object does not have a name
- See Also:
-
setAccessibleName
Set the localized accessible name of this object.- Overrides:
setAccessibleNamein classAccessibleContext- Parameters:
s- the new localized name of the object.- See Also:
-
getAccessibleDescription
Get the accessible description of this object.- Overrides:
getAccessibleDescriptionin classAccessibleContext- Returns:
- the localized description of the object; null if this object does not have a description
- See Also:
-
setAccessibleDescription
Set the accessible description of this object.- Overrides:
setAccessibleDescriptionin classAccessibleContext- Parameters:
s- the new localized description of the object- See Also:
-
getAccessibleRole
Get the role of this object.- Specified by:
getAccessibleRolein classAccessibleContext- Returns:
- an instance of AccessibleRole describing the role of the object
- See Also:
-
getAccessibleStateSet
Get the state set of this object.- Specified by:
getAccessibleStateSetin classAccessibleContext- Returns:
- an instance of AccessibleStateSet containing the current state set of the object
- See Also:
-
getAccessibleParent
Get the Accessible parent of this object.- Overrides:
getAccessibleParentin classAccessibleContext- Returns:
- the createImage,
getAccessibleRole
Set the localized accessible name of this object.- Overrides:
AccessibleContext- Returns:
- the localized name of the object; null if this object does not have a name
- See Also:
- See Also:
- Returns:
- the create-label-in-tyeSet()
-