protected class JTable.AccessibleJTable.AccessibleJTableCell extends AccessibleContext implements Accessible, AccessibleComponent
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, accessibleName, accessibleParent
Constructor and Description |
---|
JTable.AccessibleJTable.AccessibleJTableCell(JTable t,
int r,
int c,
int i)
Creates a new
AccessibleJTableCell . |
Modifier and Type | Method and Description |
---|---|
void |
addFocusListener(FocusListener listener)
Adds a focus listener to this cell.
|
boolean |
contains(Point point)
Returns
true if this table cell contains the location
at point , false otherwise. |
Accessible |
getAccessibleAt(Point point)
Table cells have no children, so we return
null here. |
Accessible |
getAccessibleChild(int i)
Returns the accessible child at index
i . |
int |
getAccessibleChildrenCount()
Returns the number of children of this object.
|
AccessibleContext |
getAccessibleContext()
Returns the accessible context of this table cell.
|
int |
getAccessibleIndexInParent()
Returns the index of this cell in the parent object.
|
AccessibleRole |
getAccessibleRole()
Returns the accessible row for the table cell.
|
AccessibleStateSet |
getAccessibleStateSet()
Returns the accessible state set of this accessible table cell.
|
Color |
getBackground()
Returns the background color of this cell.
|
Rectangle |
getBounds()
Returns the bounds of the cell relative to its table.
|
Cursor |
getCursor()
Returns the cursor for this table cell.
|
Font |
getFont()
Returns the font of the table cell.
|
FontMetrics |
getFontMetrics(Font font)
Returns the font metrics for a specified font.
|
Color |
getForeground()
Returns the foreground color of the table cell.
|
Locale |
getLocale()
Returns the locale setting for this accessible table cell.
|
Point |
getLocation()
Returns the location of this cell relative to the table's bounds.
|
Point |
getLocationOnScreen()
Returns the screen location of the table cell.
|
Dimension |
getSize()
Returns the size of the table cell.
|
boolean |
isEnabled()
Returns
true if this table cell is enabled,
false otherwise. |
boolean |
isFocusTraversable()
Returns
true if this table cell is focus traversable,
false otherwise. |
boolean |
isShowing()
Returns
true if this table cell is currently showing on
screen. |
boolean |
isVisible()
Returns
true if this cell is visible, false
otherwise. |
void |
removeFocusListener(FocusListener listener)
Removes a focus listener from the cell.
|
void |
requestFocus()
Requests that this table cell gets the keyboard focus.
|
void |
setBackground(Color color)
Sets the background of the cell.
|
void |
setBounds(Rectangle rectangle)
The bounds of the table cells cannot be manipulated directly, so
this method does nothing.
|
void |
setCursor(Cursor cursor)
Sets the cursor of the cell.
|
void |
setEnabled(boolean b)
Table cells cannot be disabled or enabled individually, so this method
does nothing.
|
void |
setFont(Font font)
Sets the font of the cell.
|
void |
setForeground(Color color)
Sets the foreground of the cell.
|
void |
setLocation(Point point)
The location of the table cells cannot be manipulated directly, so
this method does nothing.
|
void |
setSize(Dimension dimension)
The size cannot be set on table cells directly, so this method does
nothing.
|
void |
setVisible(boolean b)
The visibility cannot be set on individual table cells, so this method
does nothing.
|
addPropertyChangeListener, firePropertyChange, getAccessibleAction, getAccessibleComponent, getAccessibleDescription, getAccessibleEditableText, getAccessibleIcon, getAccessibleName, getAccessibleParent, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, removePropertyChangeListener, setAccessibleDescription, setAccessibleName, setAccessibleParent
public JTable.AccessibleJTable.AccessibleJTableCell(JTable t, int r, int c, int i)
AccessibleJTableCell
.t
- the tabler
- the rowc
- the columni
- the index of this cell inside the accessible table parentpublic AccessibleRole getAccessibleRole()
getAccessibleRole
in class AccessibleContext
AccessibleRole
public AccessibleStateSet getAccessibleStateSet()
getAccessibleStateSet
in class AccessibleContext
AccessibleState
,
AccessibleStateSet
,
AccessibleContext.addPropertyChangeListener(PropertyChangeListener)
public int getAccessibleIndexInParent()
getAccessibleIndexInParent
in class AccessibleContext
AccessibleContext.getAccessibleParent()
,
AccessibleContext.getAccessibleChildrenCount()
,
AccessibleContext.getAccessibleChild(int)
public int getAccessibleChildrenCount()
0
here.getAccessibleChildrenCount
in class AccessibleContext
0
AccessibleContext.getAccessibleChild(int)
public Accessible getAccessibleChild(int i)
i
. Table cells
don't have children, so we return null
here.getAccessibleChild
in class AccessibleContext
i
- the 0-based index to getnull
AccessibleContext.getAccessibleChildrenCount()
public Locale getLocale()
getLocale
in class AccessibleContext
public AccessibleContext getAccessibleContext()
this
.getAccessibleContext
in interface Accessible
public Color getBackground()
getBackground
in interface AccessibleComponent
AccessibleComponent.setBackground(Color)
public void setBackground(Color color)
setBackground
in interface AccessibleComponent
color
- not usedAccessibleComponent.getBackground()
public Color getForeground()
getForeground
in interface AccessibleComponent
AccessibleComponent.setForeground(Color)
public void setForeground(Color color)
setForeground
in interface AccessibleComponent
color
- not usedAccessibleComponent.getForeground()
public Cursor getCursor()
getCursor
in interface AccessibleComponent
AccessibleComponent.setCursor(Cursor)
public void setCursor(Cursor cursor)
setCursor
in interface AccessibleComponent
cursor
- not usedAccessibleComponent.getCursor()
public Font getFont()
getFont
in interface AccessibleComponent
AccessibleComponent.setFont(Font)
public void setFont(Font font)
setFont
in interface AccessibleComponent
font
- not usedAccessibleComponent.getFont()
public FontMetrics getFontMetrics(Font font)
getFontMetrics
in interface AccessibleComponent
font
- the font for which we return the metricsAccessibleComponent.getFont()
public boolean isEnabled()
true
if this table cell is enabled,
false
otherwise.isEnabled
in interface AccessibleComponent
true
if this table cell is enabled,
false
otherwiseAccessibleComponent.setEnabled(boolean)
,
AccessibleContext.getAccessibleStateSet()
,
AccessibleState.ENABLED
public void setEnabled(boolean b)
setEnabled
in interface AccessibleComponent
b
- not used hereAccessibleComponent.isEnabled()
public boolean isVisible()
true
if this cell is visible, false
otherwise.isVisible
in interface AccessibleComponent
true
if this cell is visible, false
otherwiseAccessibleComponent.setVisible(boolean)
,
AccessibleContext.getAccessibleStateSet()
,
AccessibleState.VISIBLE
public void setVisible(boolean b)
setVisible
in interface AccessibleComponent
b
- not usedAccessibleComponent.isVisible()
public boolean isShowing()
true
if this table cell is currently showing on
screen.isShowing
in interface AccessibleComponent
true
if this table cell is currently showing on
screenAccessibleComponent.isVisible()
,
AccessibleComponent.setVisible(boolean)
,
AccessibleContext.getAccessibleStateSet()
,
AccessibleState.SHOWING
public boolean contains(Point point)
true
if this table cell contains the location
at point
, false
otherwise.
point
is interpreted as relative to the coordinate system
of the table cell.contains
in interface AccessibleComponent
point
- the Point to locatetrue
if this table cell contains the location
at point
, false
otherwiseAccessibleComponent.getBounds()
public Point getLocationOnScreen()
getLocationOnScreen
in interface AccessibleComponent
AccessibleComponent.getBounds()
,
AccessibleComponent.getLocation()
public Point getLocation()
getLocation
in interface AccessibleComponent
AccessibleComponent.getBounds()
,
AccessibleComponent.getLocationOnScreen()
,
AccessibleComponent.setLocation(Point)
public void setLocation(Point point)
setLocation
in interface AccessibleComponent
point
- not usedAccessibleComponent.getLocation()
public Rectangle getBounds()
getBounds
in interface AccessibleComponent
AccessibleComponent.contains(Point)
public void setBounds(Rectangle rectangle)
setBounds
in interface AccessibleComponent
rectangle
- not usedpublic Dimension getSize()
getSize
in interface AccessibleComponent
AccessibleComponent.setSize(Dimension)
public void setSize(Dimension dimension)
setSize
in interface AccessibleComponent
dimension
- not usedAccessibleComponent.getSize()
public Accessible getAccessibleAt(Point point)
null
here.getAccessibleAt
in interface AccessibleComponent
point
- the location within this component's coordinate systemnull
public boolean isFocusTraversable()
true
if this table cell is focus traversable,
false
otherwise.isFocusTraversable
in interface AccessibleComponent
true
if this table cell is focus traversable,
false
otherwiseAccessibleContext.getAccessibleStateSet()
,
AccessibleState.FOCUSABLE
,
AccessibleState.FOCUSED
public void requestFocus()
requestFocus
in interface AccessibleComponent
AccessibleComponent.isFocusTraversable()
,
AccessibleState.FOCUSED
public void addFocusListener(FocusListener listener)
addFocusListener
in interface AccessibleComponent
listener
- the focus listener to addAccessibleComponent.removeFocusListener(FocusListener)
public void removeFocusListener(FocusListener listener)
removeFocusListener
in interface AccessibleComponent
listener
- the listener to removeAccessibleComponent.addFocusListener(FocusListener)