public interface AccessibleComponent
AccessibleContext.getAccessibleComponent() method. If the return value is not null, the object supports this interface.
| Modifier and Type | Method and Description |
|---|---|
void |
addFocusListener(FocusListener
Adds the specified focus listener to receive focus events from this component.
|
boolean |
contains(Point
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.
|
Accessible |
getAccessibleAt(Point
Returns the Accessible child, if one exists, contained at the local coordinate Point.
|
Color |
getBackground()
Gets the background color of this object.
|
Rectangle |
getBounds()
Gets the bounds of this object in the form of a Rectangle object.
|
Cursor |
getCursor()
Gets the Cursor of this object.
|
Font |
getFont()
Gets the Font of this object.
|
FontMetrics |
getFontMetrics(Font
Gets the FontMetrics of this object.
|
Color |
getForeground()
Gets the foreground color of this object.
|
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.
|
Point |
getLocationOnScreen()
Returns the location of the object on the screen.
|
Dimension |
getSize()
Returns the size of this object in the form of a Dimension object.
|
boolean |
isEnabled()
Determines if the object is enabled.
|
boolean |
isFocusTraversable()
Returns whether this object can accept focus or not.
|
boolean |
isShowing()
Determines if the object is showing.
|
boolean |
isVisible()
Determines if the object is visible.
|
void |
removeFocusListener(FocusListener
Removes the specified focus listener so it no longer receives focus events from this component.
|
void |
requestFocus()
Requests focus for this object.
|
void |
setBackground(Color
Sets the background color of this object.
|
void |
setBounds(Rectangle
Sets the bounds of this object in the form of a Rectangle object.
|
void |
setCursor(Cursor
Sets the Cursor of this object.
|
void |
setEnabled(boolean b)
Sets the enabled state of the object.
|
void |
setFont(Font
Sets the Font of this object.
|
void |
setForeground(Color
Sets the foreground color of this object.
|
void |
setLocation(Point
Sets the location of the object relative to the parent.
|
void |
setSize(Dimension
Resizes this object so that it has width and height.
|
void |
setVisible(boolean b)
Sets the visible state of the object.
|
ColorgetBackground()
setBackground(java.awt.Color)
void setBackground(Colorc)
c - the new Color for the background
setBackground(java.awt.Color)
ColorgetForeground()
setForeground(java.awt.Color)
void setForeground(Colorc)
c - the new Color for the foreground
getForeground()
CursorgetCursor()
setCursor(java.awt.Cursor)
void setCursor(Cursorcursor)
cursor - the new Cursor for the object
getCursor()
FontgetFont()
setFont(java.awt.Font)
void setFont(Fontf)
f - the new Font for the object
getFont()
FontMetricsgetFontMetrics(Font f)
f - the Font
getFont()
boolean isEnabled()
setEnabled(boolean),
AccessibleContext.getAccessibleStateSet() ,
AccessibleState.ENABLED ,
AccessibleStateSet
void setEnabled(boolean b)
b - if true, enables this object; otherwise, disables it
isEnabled()
boolean isVisible()
Objects that are visible will also have the AccessibleState.VISIBLE state set in their AccessibleStateSets.
setVisible(boolean),
AccessibleContext.getAccessibleStateSet() ,
AccessibleState.VISIBLE ,
AccessibleStateSet
void setVisible(boolean b)
b - if true, shows this object; otherwise, hides it
isVisible()
boolean isShowing()
boolean contains(Pointp)
p - the Point relative to the coordinate system of the object
getBounds()
PointgetLocationOnScreen()
getBounds(),
getLocation()
PointgetLocation()
getBounds(),
getLocationOnScreen()
void setLocation(Pointp)
p - the new position for the top-left corner
getLocation()
RectanglegetBounds()
contains(java.awt.Point)
void setBounds(Rectangler)
r - rectangle indicating this component's bounds
getBounds()
DimensiongetSize()
setSize(java.awt.Dimension)
void setSize(Dimensiond)
d - The dimension specifying the new size of the object.
getSize()
AccessiblegetAccessibleAt(Point p)
p - The point relative to the coordinate system of this object.
boolean isFocusTraversable()
AccessibleContext.getAccessibleStateSet() ,
AccessibleState.FOCUSABLE ,
AccessibleState.FOCUSED ,
AccessibleStateSet
void requestFocus()
isFocusTraversable()
void addFocusListener(FocusListenerl)
l - the focus listener
removeFocusListener(java.awt.event.FocusListener)
void removeFocusListener(FocusListenerl)
l - the focus listener
addFocusListener(java.awt.event.FocusListener)