|
|||||||||
| Home >> All >> java >> [ awt overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.awt
Class Component.AccessibleAWTComponent

java.lang.Objectjavax.accessibility.AccessibleContext
java.awt.Component.AccessibleAWTComponent
- All Implemented Interfaces:
- javax.accessibility.AccessibleComponent, java.io.Serializable
- Direct Known Subclasses:
- Button.AccessibleAWTButton, Canvas.AccessibleAWTCanvas, Checkbox.AccessibleAWTCheckbox, Choice.AccessibleAWTChoice, Container.AccessibleAWTContainer, Label.AccessibleAWTLabel, List.AccessibleAWTList, List.AccessibleAWTList.AccessibleAWTListChild, Scrollbar.AccessibleAWTScrollBar, TextComponent.AccessibleAWTTextComponent
- Enclosing class:
- Component
- protected abstract class Component.AccessibleAWTComponent
- extends javax.accessibility.AccessibleContext
- implements java.io.Serializable, javax.accessibility.AccessibleComponent
- extends javax.accessibility.AccessibleContext
This class provides accessibility support for subclasses of container.
- Since:
- 1.3
| Nested Class Summary | |
protected class |
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler
Converts component changes into property changes. |
protected class |
Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Converts focus changes into property changes. |
| Field Summary | |
protected java.awt.event.ComponentListener |
accessibleAWTComponentHandler
Converts show/hide events to PropertyChange events, and is registered as a component listener on this component. |
protected java.awt.event.FocusListener |
accessibleAWTFocusHandler
Converts focus events to PropertyChange events, and is registered as a focus listener on this component. |
private static long |
serialVersionUID
Compatible with JDK 1.3+. |
| Constructor Summary | |
protected |
Component.AccessibleAWTComponent()
The default constructor. |
| Method Summary | |
void |
addFocusListener(java.awt.event.FocusListener l)
Adds a focus listener. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds a global property change listener to the accessible component. |
boolean |
contains(Point p)
Tests if the point is contained in this component. |
javax.accessibility.Accessible |
getAccessibleAt(Point p)
Returns the Accessible child at a point relative to the coordinate system of this component, if one exists, or null. |
javax.accessibility.Accessible |
getAccessibleChild(int i)
Returns the ith accessible child. |
int |
getAccessibleChildrenCount()
Returns the number of children of this component which implement Accessible. |
javax.accessibility.AccessibleComponent |
getAccessibleComponent()
Returns this, since it is an accessible component. |
java.lang.String |
getAccessibleDescription()
Returns a brief description of this accessible context. |
int |
getAccessibleIndexInParent()
Returns the index of this component in its accessible parent. |
java.lang.String |
getAccessibleName()
Returns the accessible name of this component. |
javax.accessibility.Accessible |
getAccessibleParent()
Returns the parent of this component, if it is accessible. |
javax.accessibility.AccessibleRole |
getAccessibleRole()
Returns the role of this component. |
javax.accessibility.AccessibleStateSet |
getAccessibleStateSet()
Returns a state set describing this component's state. |
Color |
getBackground()
Gets the background color. |
Rectangle |
getBounds()
Gets the bounds of this component, or null if it is not on screen. |
Cursor |
getCursor()
Gets the cursor. |
Font |
getFont()
Gets the font. |
FontMetrics |
getFontMetrics(Font f)
Gets the font metrics for a font. |
Color |
getForeground()
Gets the foreground color. |
java.util.Locale |
getLocale()
Returns the locale of this component. |
Point |
getLocation()
Returns the location of this object relative to its parent's coordinate system, or null if it is not showing. |
Point |
getLocationOnScreen()
Returns the location of this object on the screen, or null if it is not showing. |
Dimension |
getSize()
Gets the size of this component, or null if it is not showing. |
boolean |
isEnabled()
Tests if the component is enabled. |
boolean |
isFocusTraversable()
Tests whether this component can accept focus. |
boolean |
isShowing()
Tests if the component is showing. |
boolean |
isVisible()
Test whether the component is visible (not necesarily showing). |
void |
removeFocusListener(java.awt.event.FocusListener l)
Removes a focus listener. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes a global property change listener from this accessible component. |
void |
requestFocus()
Requests focus for this component. |
void |
setBackground(Color c)
Sets the background color. |
void |
setBounds(Rectangle r)
Sets the bounds of this component. |
void |
setCursor(Cursor cursor)
Sets the cursor. |
void |
setEnabled(boolean b)
Set whether the component is enabled. |
void |
setFont(Font f)
Sets the font. |
void |
setForeground(Color c)
Sets the foreground color. |
void |
setLocation(Point p)
Sets the location of this relative to its parent's coordinate system. |
void |
setSize(Dimension d)
Sets the size of this component. |
void |
setVisible(boolean b)
Sets the visibility of this component. |
| Methods inherited from class javax.accessibility.AccessibleContext |
firePropertyChange, getAccessibleAction, getAccessibleEditableText, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
serialVersionUID
private static final long serialVersionUID
- Compatible with JDK 1.3+.
- See Also:
- Constant Field Values
accessibleAWTComponentHandler
protected java.awt.event.ComponentListener accessibleAWTComponentHandler
- Converts show/hide events to PropertyChange events, and is registered
as a component listener on this component.
accessibleAWTFocusHandler
protected java.awt.event.FocusListener accessibleAWTFocusHandler
- Converts focus events to PropertyChange events, and is registered
as a focus listener on this component.
| Constructor Detail |
Component.AccessibleAWTComponent
protected Component.AccessibleAWTComponent()
- The default constructor.
| Method Detail |
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
- Adds a global property change listener to the accessible component.
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
- Removes a global property change listener from this accessible
component.
getAccessibleName
public java.lang.String getAccessibleName()
- Returns the accessible name of this component. It is almost always
wrong to return getName(), since it is not localized. In fact, for
things like buttons, this should be the text of the button, not the
name of the object. The tooltip text might also be appropriate.
getAccessibleDescription
public java.lang.String getAccessibleDescription()
- Returns a brief description of this accessible context. This should
be localized.
getAccessibleRole
public javax.accessibility.AccessibleRole getAccessibleRole()
- Returns the role of this component.
getAccessibleStateSet
public javax.accessibility.AccessibleStateSet getAccessibleStateSet()
- Returns a state set describing this component's state.
getAccessibleParent
public javax.accessibility.Accessible getAccessibleParent()
- Returns the parent of this component, if it is accessible.
getAccessibleIndexInParent
public int getAccessibleIndexInParent()
- Returns the index of this component in its accessible parent.
getAccessibleChildrenCount
public int getAccessibleChildrenCount()
- Returns the number of children of this component which implement
Accessible. Subclasses must override this if they can have children.
getAccessibleChild
public javax.accessibility.Accessible getAccessibleChild(int i)
- Returns the ith accessible child. Subclasses must override this if
they can have children.
getLocale
public java.util.Locale getLocale()
- Returns the locale of this component.
getAccessibleComponent
public javax.accessibility.AccessibleComponent getAccessibleComponent()
- Returns this, since it is an accessible component.
getBackground
public Color getBackground()
- Gets the background color.
- Specified by:
getBackgroundin interfacejavax.accessibility.AccessibleComponent
setBackground
public void setBackground(Color c)
- Sets the background color.
- Specified by:
setBackgroundin interfacejavax.accessibility.AccessibleComponent
getForeground
public Color getForeground()
- Gets the foreground color.
- Specified by:
getForegroundin interfacejavax.accessibility.AccessibleComponent
setForeground
public void setForeground(Color c)
- Sets the foreground color.
- Specified by:
setForegroundin interfacejavax.accessibility.AccessibleComponent
getCursor
public Cursor getCursor()
- Gets the cursor.
- Specified by:
getCursorin interfacejavax.accessibility.AccessibleComponent
setCursor
public void setCursor(Cursor cursor)
- Sets the cursor.
- Specified by:
setCursorin interfacejavax.accessibility.AccessibleComponent
getFont
public Font getFont()
- Gets the font.
- Specified by:
getFontin interfacejavax.accessibility.AccessibleComponent
setFont
public void setFont(Font f)
- Sets the font.
- Specified by:
setFontin interfacejavax.accessibility.AccessibleComponent
getFontMetrics
public FontMetrics getFontMetrics(Font f)
- Gets the font metrics for a font.
- Specified by:
getFontMetricsin interfacejavax.accessibility.AccessibleComponent
isEnabled
public boolean isEnabled()
- Tests if the component is enabled.
- Specified by:
isEnabledin interfacejavax.accessibility.AccessibleComponent
setEnabled
public void setEnabled(boolean b)
- Set whether the component is enabled.
- Specified by:
setEnabledin interfacejavax.accessibility.AccessibleComponent
isVisible
public boolean isVisible()
- Test whether the component is visible (not necesarily showing).
- Specified by:
isVisiblein interfacejavax.accessibility.AccessibleComponent
setVisible
public void setVisible(boolean b)
- Sets the visibility of this component.
- Specified by:
setVisiblein interfacejavax.accessibility.AccessibleComponent
isShowing
public boolean isShowing()
- Tests if the component is showing.
- Specified by:
isShowingin interfacejavax.accessibility.AccessibleComponent
contains
public boolean contains(Point p)
- Tests if the point is contained in this component.
- Specified by:
containsin interfacejavax.accessibility.AccessibleComponent
getLocationOnScreen
public Point getLocationOnScreen()
- Returns the location of this object on the screen, or null if it is
not showing.
- Specified by:
getLocationOnScreenin interfacejavax.accessibility.AccessibleComponent
getLocation
public Point getLocation()
- Returns the location of this object relative to its parent's coordinate
system, or null if it is not showing.
- Specified by:
getLocationin interfacejavax.accessibility.AccessibleComponent
setLocation
public void setLocation(Point p)
- Sets the location of this relative to its parent's coordinate system.
- Specified by:
setLocationin interfacejavax.accessibility.AccessibleComponent
getBounds
public Rectangle getBounds()
- Gets the bounds of this component, or null if it is not on screen.
- Specified by:
getBoundsin interfacejavax.accessibility.AccessibleComponent
setBounds
public void setBounds(Rectangle r)
- Sets the bounds of this component.
- Specified by:
setBoundsin interfacejavax.accessibility.AccessibleComponent
getSize
public Dimension getSize()
- Gets the size of this component, or null if it is not showing.
- Specified by:
getSizein interfacejavax.accessibility.AccessibleComponent
setSize
public void setSize(Dimension d)
- Sets the size of this component.
- Specified by:
setSizein interfacejavax.accessibility.AccessibleComponent
getAccessibleAt
public javax.accessibility.Accessible getAccessibleAt(Point p)
- Returns the Accessible child at a point relative to the coordinate
system of this component, if one exists, or null. Since components
have no children, subclasses must override this to get anything besides
null.
- Specified by:
getAccessibleAtin interfacejavax.accessibility.AccessibleComponent
isFocusTraversable
public boolean isFocusTraversable()
- Tests whether this component can accept focus.
- Specified by:
isFocusTraversablein interfacejavax.accessibility.AccessibleComponent
requestFocus
public void requestFocus()
- Requests focus for this component.
- Specified by:
requestFocusin interfacejavax.accessibility.AccessibleComponent
addFocusListener
public void addFocusListener(java.awt.event.FocusListener l)
- Adds a focus listener.
- Specified by:
addFocusListenerin interfacejavax.accessibility.AccessibleComponent
removeFocusListener
public void removeFocusListener(java.awt.event.FocusListener l)
- Removes a focus listener.
- Specified by:
removeFocusListenerin interfacejavax.accessibility.AccessibleComponent
|
|||||||||
| Home >> All >> java >> [ awt overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC