GNU Classpath (0.95) | |
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
protected abstract class Component.AccessibleAWTComponent
extends AccessibleContext
implements Serializable, AccessibleComponent
Nested Class Summary | |
protected class |
|
protected class |
|
Field Summary | |
protected ComponentListener |
|
protected FocusListener |
|
Constructor Summary | |
|
Method Summary | |
void |
|
void |
|
boolean | |
Accessible |
|
Accessible |
|
int |
|
AccessibleComponent |
|
String |
|
int |
|
String |
|
Accessible |
|
AccessibleRole |
|
AccessibleStateSet |
|
Color |
|
Rectangle |
|
Cursor |
|
Font |
|
FontMetrics |
|
Color |
|
Locale |
|
Point |
|
Point |
|
Dimension |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
void |
|
void |
|
void |
|
void |
|
void | |
void | |
void |
|
void | |
void |
|
void |
|
void | |
void |
|
Methods inherited from class java.lang.Object | |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
protected ComponentListener accessibleAWTComponentHandler
Converts show/hide events to PropertyChange events, and is registered as a component listener on this component.
protected FocusListener accessibleAWTFocusHandler
Converts focus events to PropertyChange events, and is registered as a focus listener on this component.
public void addFocusListener(FocusListener l)
Adds a focus listener.
- Specified by:
- addFocusListener in interface AccessibleComponent
- Parameters:
l
- the listener to add
public void addPropertyChangeListener(PropertyChangeListener l)
Adds a global property change listener to the accessible component.
- Overrides:
- addPropertyChangeListener in interface AccessibleContext
- Parameters:
l
- the listener to add
- See Also:
AccessibleContext.ACCESSIBLE_NAME_PROPERTY
,AccessibleContext.ACCESSIBLE_DESCRIPTION_PROPERTY
,AccessibleContext.ACCESSIBLE_STATE_PROPERTY
,AccessibleContext.ACCESSIBLE_VALUE_PROPERTY
,AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY
,AccessibleContext.ACCESSIBLE_TEXT_PROPERTY
,AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY
public boolean contains(Point p)
Tests if the point is contained in this component.
- Specified by:
- contains in interface AccessibleComponent
- Parameters:
p
- the point to check
- Returns:
- true if it is contained
- Throws:
NullPointerException
- if p is null
public 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:
- getAccessibleAt in interface AccessibleComponent
- Parameters:
p
- the point to check
- Returns:
- the accessible child at that point
- Throws:
NullPointerException
- if p is null
public Accessible getAccessibleChild(int i)
Returns the ith accessible child. Subclasses must override this if they can have children.
- Overrides:
- getAccessibleChild in interface AccessibleContext
- Returns:
- the ith accessible child, or null
- See Also:
getAccessibleChildrenCount()
public int getAccessibleChildrenCount()
Returns the number of children of this component which implement Accessible. Subclasses must override this if they can have children.
- Overrides:
- getAccessibleChildrenCount in interface AccessibleContext
- Returns:
- the number of accessible children, default 0
public AccessibleComponent getAccessibleComponent()
Returns this, since it is an accessible component.
- Overrides:
- getAccessibleComponent in interface AccessibleContext
- Returns:
- the accessible component
public String getAccessibleDescription()
Returns a brief description of this accessible context. This should be localized.
- Overrides:
- getAccessibleDescription in interface AccessibleContext
- Returns:
- a description of this component
- See Also:
setAccessibleDescription(String)
public int getAccessibleIndexInParent()
Returns the index of this component in its accessible parent.
- Overrides:
- getAccessibleIndexInParent in interface AccessibleContext
- Returns:
- the index, or -1 if the parent is not accessible
- See Also:
getAccessibleParent()
public 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.
- Overrides:
- getAccessibleName in interface AccessibleContext
- Returns:
- the name
- See Also:
setAccessibleName(String)
public Accessible getAccessibleParent()
Returns the parent of this component, if it is accessible.
- Overrides:
- getAccessibleParent in interface AccessibleContext
- Returns:
- the accessible parent
public AccessibleRole getAccessibleRole()
Returns the role of this component.
- Overrides:
- getAccessibleRole in interface AccessibleContext
- Returns:
- the accessible role
public AccessibleStateSet getAccessibleStateSet()
Returns a state set describing this component's state.
- Overrides:
- getAccessibleStateSet in interface AccessibleContext
- Returns:
- a new state set
- See Also:
AccessibleState
public Color getBackground()
Gets the background color.
- Specified by:
- getBackground in interface AccessibleComponent
- Returns:
- the background color
- See Also:
setBackground(Color)
public Rectangle getBounds()
Gets the bounds of this component, or null if it is not on screen.
- Specified by:
- getBounds in interface AccessibleComponent
- Returns:
- the bounds
- See Also:
contains(Point)
,setBounds(Rectangle)
public Cursor getCursor()
Gets the cursor.
- Specified by:
- getCursor in interface AccessibleComponent
- Returns:
- the cursor
- See Also:
setCursor(Cursor)
public Font getFont()
Gets the font.
- Specified by:
- getFont in interface AccessibleComponent
- Returns:
- the font
- See Also:
setFont(Font)
public FontMetrics getFontMetrics(Font f)
Gets the font metrics for a font.
- Specified by:
- getFontMetrics in interface AccessibleComponent
- Parameters:
f
- the font to look up
- Returns:
- its metrics
- Throws:
NullPointerException
- if f is null
- See Also:
getFont()
public Color getForeground()
Gets the foreground color.
- Specified by:
- getForeground in interface AccessibleComponent
- Returns:
- the foreground color
- See Also:
setForeground(Color)
public Locale getLocale()
Returns the locale of this component.
- Overrides:
- getLocale in interface AccessibleContext
- Returns:
- the locale
- Throws:
IllegalComponentStateException
- if the locale is unknown
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:
- getLocation in interface AccessibleComponent
- Returns:
- the location
- See Also:
getBounds()
,getLocationOnScreen()
public Point getLocationOnScreen()
Returns the location of this object on the screen, or null if it is not showing.
- Specified by:
- getLocationOnScreen in interface AccessibleComponent
- Returns:
- the location relative to screen coordinates, if showing
- See Also:
getBounds()
,getLocation()
public Dimension getSize()
Gets the size of this component, or null if it is not showing.
- Specified by:
- getSize in interface AccessibleComponent
- Returns:
- the size
- See Also:
setSize(Dimension)
public boolean isEnabled()
Tests if the component is enabled.
- Specified by:
- isEnabled in interface AccessibleComponent
- Returns:
- true if the component is enabled
public boolean isFocusTraversable()
Tests whether this component can accept focus.
- Specified by:
- isFocusTraversable in interface AccessibleComponent
- Returns:
- true if this is focus traversable
- See Also:
()
,AccessibleState.FOCUSABLE
,AccessibleState.FOCUSED
public boolean isShowing()
Tests if the component is showing.
- Specified by:
- isShowing in interface AccessibleComponent
- Returns:
- true if this is showing
public boolean isVisible()
Test whether the component is visible (not necesarily showing).
- Specified by:
- isVisible in interface AccessibleComponent
- Returns:
- true if it is visible
public void removeFocusListener(FocusListener l)
Removes a focus listener.
- Specified by:
- removeFocusListener in interface AccessibleComponent
- Parameters:
l
- the listener to remove
public void removePropertyChangeListener(PropertyChangeListener l)
Removes a global property change listener from this accessible component.
- Overrides:
- removePropertyChangeListener in interface AccessibleContext
- Parameters:
l
- the listener to remove
public void requestFocus()
Requests focus for this component.
- Specified by:
- requestFocus in interface AccessibleComponent
- See Also:
()
public void setBackground(Color c)
Sets the background color.
- Specified by:
- setBackground in interface AccessibleComponent
- Parameters:
c
- the background color
- See Also:
getBackground()
,isOpaque()
public void setBounds(Rectangle r)
Sets the bounds of this component.
- Specified by:
- setBounds in interface AccessibleComponent
- Parameters:
r
- the bounds
- Throws:
NullPointerException
- if r is null
- See Also:
getBounds()
public void setCursor(Cursor cursor)
Sets the cursor.
- Specified by:
- setCursor in interface AccessibleComponent
- Parameters:
cursor
- the cursor
- See Also:
getCursor()
public void setEnabled(boolean b)
Set whether the component is enabled.
- Specified by:
- setEnabled in interface AccessibleComponent
- Parameters:
b
- the new enabled status
- See Also:
isEnabled()
public void setFont(Font f)
Sets the font.
- Specified by:
- setFont in interface AccessibleComponent
- Parameters:
f
- the font
- See Also:
getFont()
public void setForeground(Color c)
Sets the foreground color.
- Specified by:
- setForeground in interface AccessibleComponent
- Parameters:
c
- the foreground color
- See Also:
getForeground()
public void setLocation(Point p)
Sets the location of this relative to its parent's coordinate system.
- Specified by:
- setLocation in interface AccessibleComponent
- Parameters:
p
- the location
- Throws:
NullPointerException
- if p is null
- See Also:
getLocation()
public void setSize(Dimension d)
Sets the size of this component.
- Specified by:
- setSize in interface AccessibleComponent
- Parameters:
d
- the size
- Throws:
NullPointerException
- if d is null
- See Also:
getSize()
public void setVisible(boolean b)
Sets the visibility of this component.
- Specified by:
- setVisible in interface AccessibleComponent
- Parameters:
b
- the desired visibility
- See Also:
isVisible()
GNU Classpath (0.95) |