AccessibleComponent interface should be supported by any object
that is rendered on the screen. This interface provides the standard
mechanism for an assistive technology to determine and set the graphical
representation of an object. Applications can determine if an object supports
the AccessibleComponent interface by first obtaining its
AccessibleContext and then calling the
AccessibleContext#getAccessibleComponent method. If the return value
is not null, the object supports this interface.
Accessible, Accessible#getAccessibleContext, AccessibleContext, AccessibleContext#getAccessibleComponent
| Modifier and Type | Method and Description |
|---|---|
| public void | addFocusListener(FocusListener
the focus listener l)Adds the specified focus listener to receive focus events from this component. |
| public boolean | Returns: true if object contains point; otherwise falsethe point relative to the coordinate system of the object p)Checks 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. |
| public Accessible | Returns: theAccessible, if it exists, at the specified location;
otherwise nullThe point relative to the coordinate system of this object p)Returns the |
| public Color | Returns: the background color, if supported, of the object; otherwise,nullGets the background color of this object. |
| public Rectangle | Returns: A rectangle indicating this component's bounds;null if
this object is not on the screen.Gets the bounds of this object in the form of a |
| public Cursor | Returns: the cursor, if supported, of the object; otherwise,nullGets the cursor of this object. |
| public Font | Returns: the font, if supported, for the object; otherwise,nullGets the font of this object. |
| public FontMetrics | Returns: theFontMetrics, if supported, the object; otherwise,
nullthe font for which font metrics is to be obtained f)Gets the |
| public Color | Returns: the foreground color, if supported, of the object; otherwise,nullGets the foreground color of this object. |
| public Point | Returns: An instance ofPoint representing the top-left corner of
the object's bounds in the coordinate space of the screen;
null if this object or its parent are not on the screenGets 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. |
| public Point | Returns: the location of the object on screen;null if this object
is not on the screenReturns the location of the object on the screen. |
| public Dimension | Returns: ADimension object that indicates the size of this
component; null if this object is not on the screenReturns the size of this object in the form of a |
| public boolean | |
| public boolean | Returns: true if object can accept focus; otherwise falseReturns whether this object can accept focus or not. |
| public boolean | |
| public boolean | |
| public void | removeFocusListener(FocusListener
the focus listener l)Removes the specified focus listener so it no longer receives focus events from this component. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setEnabled(boolean
if b)true, enables this object; otherwise, disables itSets the enabled state of the object. |
| public void | |
| public void | |
| public void | setLocation(Point
the new position for the top-left corner p)Sets the location of the object relative to the parent. |
| public void | |
| public void | setVisible(boolean
if b)true, shows this object; otherwise, hides itSets the visible state of the object. |
| addFocusListener | back to summary |
|---|---|
| public void addFocusListener(FocusListener l) Adds the specified focus listener to receive focus events from this component.
| |
| contains | back to summary |
|---|---|
| public boolean contains(Point p) Checks 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. | |
| getAccessibleAt | back to summary |
|---|---|
| public Accessible getAccessibleAt(Point p) Returns the
| |
| getBackground | back to summary |
|---|---|
| public Color getBackground() Gets the background color of this object.
| |
| getBounds | back to summary |
|---|---|
| public Rectangle getBounds() Gets the bounds of this object in the form of a | |
| getCursor | back to summary |
|---|---|
| public Cursor getCursor() Gets the cursor of this object. | |
| getFont | back to summary |
|---|---|
| public Font getFont() Gets the font of this object. | |
| getFontMetrics | back to summary |
|---|---|
| public FontMetrics getFontMetrics(Font f) Gets the
| |
| getForeground | back to summary |
|---|---|
| public Color getForeground() Gets the foreground color of this object.
| |
| getLocation | back to summary |
|---|---|
| public Point getLocation() 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.
| |
| getLocationOnScreen | back to summary |
|---|---|
| public Point getLocationOnScreen() Returns the location of the object on the screen.
| |
| getSize | back to summary |
|---|---|
| public Dimension getSize() Returns the size of this object in the form of a | |
| isEnabled | back to summary |
|---|---|
| public boolean isEnabled() Determines if the object is enabled. Objects that are enabled will also
have the
| |
| isFocusTraversable | back to summary |
|---|---|
| public boolean isFocusTraversable() Returns whether this object can accept focus or not. Objects that can
accept focus will also have the
| |
| isShowing | back to summary |
|---|---|
| public boolean isShowing() Determines if the object is showing. This is determined by checking the visibility of the object and its ancestors. Note this will return
| |
| isVisible | back to summary |
|---|---|
| public boolean isVisible() Determines if the object is visible. Note this means that the object
intends to be visible; however, it may not be showing on the screen
because one of the objects that this object is contained by is currently
not visible. To determine if an object is showing on the screen, use
Objects that are visible will also have the
| |
| removeFocusListener | back to summary |
|---|---|
| public void removeFocusListener(FocusListener l) Removes the specified focus listener so it no longer receives focus events from this component.
| |
| requestFocus | back to summary |
|---|---|
| public void requestFocus() Requests focus for this object. If this object cannot accept focus, nothing will happen. Otherwise, the object will attempt to take focus.
| |
| setBackground | back to summary |
|---|---|
| public void setBackground(Color c) Sets the background color of this object.
| |
| setBounds | back to summary |
|---|---|
| public void setBounds(Rectangle r) Sets the bounds of this object in the form of a | |
| setCursor | back to summary |
|---|---|
| public void setCursor(Cursor cursor) Sets the cursor of this object. | |
| setEnabled | back to summary |
|---|---|
| public void setEnabled(boolean b) Sets the enabled state of the object.
| |
| setFont | back to summary |
|---|---|
| public void setFont(Font f) Sets the font of this object. | |
| setForeground | back to summary |
|---|---|
| public void setForeground(Color c) Sets the foreground color of this object.
| |
| setLocation | back to summary |
|---|---|
| public void setLocation(Point p) Sets the location of the object relative to the parent.
| |
| setSize | back to summary |
|---|---|
| public void setSize(Dimension d) Resizes this object so that it has width and height. | |
| setVisible | back to summary |
|---|---|
| public void setVisible(boolean b) Sets the visible state of the object.
| |