Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
javax.accessibility.AccessibleContext
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
protected class JTable.AccessibleJTable.AccessibleJTableCell
extends AccessibleContext
implements Accessible, AccessibleComponent
Field Summary |
Constructor Summary | |
|
Method Summary | |
void |
|
boolean | |
Accessible |
|
Accessible |
|
int |
|
AccessibleContext |
|
int |
|
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 |
|
Methods inherited from class java.lang.Object | |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
public AccessibleJTableCell(JTable t, int r, int c, int i)
Creates a newAccessibleJTableCell
.
- Parameters:
t
- the tabler
- the rowc
- the columni
- the index of this cell inside the accessible table parent
public void addFocusListener(FocusListener listener)
Adds a focus listener to this cell. The focus listener is really added to the table, so there is no way to find out when an individual cell changes the focus.
- Specified by:
- addFocusListener in interface AccessibleComponent
- Parameters:
listener
- the focus listener to add
public boolean contains(Point point)
Returnstrue
if this table cell contains the location atpoint
,false
otherwise.point
is interpreted as relative to the coordinate system of the table cell.
- Specified by:
- contains in interface AccessibleComponent
- Returns:
true
if this table cell contains the location atpoint
,false
otherwise
public Accessible getAccessibleAt(Point point)
Table cells have no children, so we returnnull
here.
- Specified by:
- getAccessibleAt in interface AccessibleComponent
- Returns:
null
public Accessible getAccessibleChild(int i)
Returns the accessible child at indexi
. Table cells don't have children, so we returnnull
here.
- Overrides:
- getAccessibleChild in interface AccessibleContext
- Returns:
null
public int getAccessibleChildrenCount()
Returns the number of children of this object. Table cells cannot have children, so we return0
here.
- Overrides:
- getAccessibleChildrenCount in interface AccessibleContext
- Returns:
0
public AccessibleContext getAccessibleContext()
Returns the accessible context of this table cell. Since accessible table cells are their own accessible context, we returnthis
.
- Specified by:
- getAccessibleContext in interface Accessible
- Returns:
- the accessible context of this table cell
public int getAccessibleIndexInParent()
Returns the index of this cell in the parent object.
- Overrides:
- getAccessibleIndexInParent in interface AccessibleContext
- Returns:
- the index of this cell in the parent object
public AccessibleRole getAccessibleRole()
Returns the accessible row for the table cell.
- Overrides:
- getAccessibleRole in interface AccessibleContext
- Returns:
- the accessible row for the table cell
public AccessibleStateSet getAccessibleStateSet()
Returns the accessible state set of this accessible table cell.
- Overrides:
- getAccessibleStateSet in interface AccessibleContext
- Returns:
- the accessible state set of this accessible table cell
public Color getBackground()
Returns the background color of this cell.
- Specified by:
- getBackground in interface AccessibleComponent
- Returns:
- the background color of this cell
public Rectangle getBounds()
Returns the bounds of the cell relative to its table.
- Specified by:
- getBounds in interface AccessibleComponent
- Returns:
- the bounds of the cell relative to its table
public Cursor getCursor()
Returns the cursor for this table cell.
- Specified by:
- getCursor in interface AccessibleComponent
- Returns:
- the cursor for this table cell
public Font getFont()
Returns the font of the table cell.
- Specified by:
- getFont in interface AccessibleComponent
- Returns:
- the font of the table cell
public FontMetrics getFontMetrics(Font font)
Returns the font metrics for a specified font.
- Specified by:
- getFontMetrics in interface AccessibleComponent
- Parameters:
font
- the font for which we return the metrics
- Returns:
- the font metrics for a specified font
public Color getForeground()
Returns the foreground color of the table cell.
- Specified by:
- getForeground in interface AccessibleComponent
- Returns:
- the foreground color of the table cell
public Locale getLocale()
Returns the locale setting for this accessible table cell.
- Overrides:
- getLocale in interface AccessibleContext
- Returns:
- the locale setting for this accessible table cell
public Point getLocation()
Returns the location of this cell relative to the table's bounds.
- Specified by:
- getLocation in interface AccessibleComponent
- Returns:
- the location of this cell relative to the table's bounds
public Point getLocationOnScreen()
Returns the screen location of the table cell.
- Specified by:
- getLocationOnScreen in interface AccessibleComponent
- Returns:
- the screen location of the table cell
public Dimension getSize()
Returns the size of the table cell.
- Specified by:
- getSize in interface AccessibleComponent
- Returns:
- the size of the table cell
public boolean isEnabled()
Returnstrue
if this table cell is enabled,false
otherwise.
- Specified by:
- isEnabled in interface AccessibleComponent
- Returns:
true
if this table cell is enabled,false
otherwise
public boolean isFocusTraversable()
Returnstrue
if this table cell is focus traversable,false
otherwise.
- Specified by:
- isFocusTraversable in interface AccessibleComponent
- Returns:
true
if this table cell is focus traversable,false
otherwise
public boolean isShowing()
Returnstrue
if this table cell is currently showing on screen.
- Specified by:
- isShowing in interface AccessibleComponent
- Returns:
true
if this table cell is currently showing on screen
public boolean isVisible()
Returnstrue
if this cell is visible,false
otherwise.
- Specified by:
- isVisible in interface AccessibleComponent
- Returns:
true
if this cell is visible,false
otherwise
public void removeFocusListener(FocusListener listener)
Removes a focus listener from the cell. The focus listener is really removed from the table.
- Specified by:
- removeFocusListener in interface AccessibleComponent
- Parameters:
listener
- the listener to remove
public void requestFocus()
Requests that this table cell gets the keyboard focus.
- Specified by:
- requestFocus in interface AccessibleComponent
public void setBackground(Color color)
Sets the background of the cell. Since table cells cannot have individual background colors, this method does nothing. Set the background directly on the table instead.
- Specified by:
- setBackground in interface AccessibleComponent
- Parameters:
color
- not used
public void setBounds(Rectangle rectangle)
The bounds of the table cells cannot be manipulated directly, so this method does nothing.
- Specified by:
- setBounds in interface AccessibleComponent
- Parameters:
rectangle
- not used
public void setCursor(Cursor cursor)
Sets the cursor of the cell. Since table cells cannot have individual cursors, this method does nothing. Set the cursor directly on the table instead.
- Specified by:
- setCursor in interface AccessibleComponent
- Parameters:
cursor
- not used
public void setEnabled(boolean b)
Table cells cannot be disabled or enabled individually, so this method does nothing. Set the enabled flag on the table itself.
- Specified by:
- setEnabled in interface AccessibleComponent
- Parameters:
b
- not used here
public void setFont(Font font)
Sets the font of the cell. Since table cells cannot have individual fonts, this method does nothing. Set the font directly on the table instead.
- Specified by:
- setFont in interface AccessibleComponent
- Parameters:
font
- not used
public void setForeground(Color color)
Sets the foreground of the cell. Since table cells cannot have individual foreground colors, this method does nothing. Set the foreground directly on the table instead.
- Specified by:
- setForeground in interface AccessibleComponent
- Parameters:
color
- not used
public void setLocation(Point point)
The location of the table cells cannot be manipulated directly, so this method does nothing.
- Specified by:
- setLocation in interface AccessibleComponent
- Parameters:
point
- not used
public void setSize(Dimension dimension)
The size cannot be set on table cells directly, so this method does nothing.
- Specified by:
- setSize in interface AccessibleComponent
- Parameters:
dimension
- not used
public void setVisible(boolean b)
The visibility cannot be set on individual table cells, so this method does nothing. Set the visibility on the table itself.
- Specified by:
- setVisible in interface AccessibleComponent
- Parameters:
b
- not used