javax.swing.table

Class JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry

Enclosing Class:
JTableHeader.AccessibleJTableHeader
Implemented Interfaces:
Accessible, AccessibleComponent

protected class JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
extends AccessibleContext
implements Accessible, AccessibleComponent

Field Summary

Fields inherited from class javax.accessibility.AccessibleContext

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 Summary

AccessibleJTableHeaderEntry(int c, JTableHeader p, JTable t)

Method Summary

void
addFocusListener(FocusListener l)
void
addPropertyChangeListener(PropertyChangeListener l)
boolean
contains(Point p)
Tests whether or not the specified point is contained within this component.
AccessibleAction
getAccessibleAction()
Get any supported accessible actions.
Accessible
getAccessibleAt(Point p)
If an object exists at the specified point which is a child of this parent component, and it is accessible, then it is returned.
Accessible
getAccessibleChild(int i)
Returns null as the header entry has no accessible children.
int
getAccessibleChildrenCount()
Returns the number of accessible children, zero in this case.
AccessibleComponent
getAccessibleComponent()
Returns the accessible component for this header entry.
AccessibleContext
getAccessibleContext()
Returns the accessible context for this header entry.
String
getAccessibleDescription()
Returns the accessible description.
int
getAccessibleIndexInParent()
Returns the index of this header entry.
String
getAccessibleName()
Returns the accessible name.
AccessibleRole
getAccessibleRole()
Returns the accessible role for the header entry.
AccessibleSelection
getAccessibleSelection()
Get any supported accessible selection.
AccessibleStateSet
getAccessibleStateSet()
Gets the state set of this object.
AccessibleText
getAccessibleText()
Get any supported accessible text.
AccessibleValue
getAccessibleValue()
Get any supported accessible value.
Color
getBackground()
Get the background color of this component.
Rectangle
getBounds()
Get the bounds of this component relative to its parent - it's width, height, and relative location to its parent.
Cursor
getCursor()
Get the cursor of this component.
Font
getFont()
Get the font of this component
FontMetrics
getFontMetrics(Font f)
Get the FontMetrics of the specified font in this component.
Color
getForeground()
Get the foreground color of this component.
Locale
getLocale()
Gets the component locale, deferring to the parent if one is not declared.
Point
getLocation()
Get the location of this component in the parent's coordinate system.
Point
getLocationOnScreen()
Get the location of this component in the screen's coordinate space.
Dimension
getSize()
Get the size of this component - it's width and height.
boolean
isEnabled()
Indicates whether or not this component is enabled.
boolean
isFocusTraversable()
Indicates whether or not this component can accept focus.
boolean
isShowing()
Indicates whether or not this component is visible by checking the visibility of this component and its ancestors.
boolean
isVisible()
Indicates whether or not this component is visible or intends to be visible although one of its ancestors may not be.
void
removeFocusListener(FocusListener l)
void
removePropertyChangeListener(PropertyChangeListener l)
void
requestFocus()
void
setAccessibleDescription(String s)
void
setAccessibleName(String s)
void
setBackground(Color c)
Set the background color of this component to the specified color.
void
setBounds(Rectangle r)
Set the bounds of this component to the specified height and width, and relative location to its parent.
void
setCursor(Cursor c)
Set the cursor of the component.
void
setEnabled(boolean b)
Set this component to an enabled or disabled state.
void
setFont(Font f)
Set the font of this component.
void
setForeground(Color c)
Set the foreground color of this component.
void
setLocation(Point p)
Set the location of this component relative to its parent.
void
setSize(Dimension d)
Set the size of this component to the given dimensions.
void
setVisible(boolean b)
Set the visible state of this component.

Methods inherited from class javax.accessibility.AccessibleContext

addPropertyChangeListener, firePropertyChange, getAccessibleAction, getAccessibleChild, getAccessibleChildrenCount, getAccessibleComponent, getAccessibleDescription, getAccessibleEditableText, getAccessibleIcon, getAccessibleIndexInParent, getAccessibleName, getAccessibleParent, getAccessibleRelationSet, getAccessibleRole, getAccessibleSelection, getAccessibleStateSet, getAccessibleTable, getAccessibleText, getAccessibleValue, getLocale, removePropertyChangeListener, setAccessibleDescription, setAccessibleName, setAccessibleParent

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Details

AccessibleJTableHeaderEntry

public AccessibleJTableHeaderEntry(int c,
                                   JTableHeader p,
                                   JTable t)

Method Details

addFocusListener

public void addFocusListener(FocusListener l)
Specified by:
addFocusListener in interface AccessibleComponent

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)
Overrides:
addPropertyChangeListener in interface AccessibleContext

contains

public boolean contains(Point p)
Tests whether or not the specified point is contained within this component. The coordinates are specified relative to this component's coordinate system.
Specified by:
contains in interface AccessibleComponent
Parameters:
Returns:
true if the point is within this component
Throws:
NullPointerException - if point is null

getAccessibleAction

public AccessibleAction getAccessibleAction()
Get any supported accessible actions. The default implementation returns null.
Overrides:
getAccessibleAction in interface AccessibleContext
Returns:
the supported action, or null

getAccessibleAt

public Accessible getAccessibleAt(Point p)
If an object exists at the specified point which is a child of this parent component, and it is accessible, then it is returned.
Specified by:
getAccessibleAt in interface AccessibleComponent
Parameters:
Returns:
the accessible child object at that point, or null

getAccessibleChild

public Accessible getAccessibleChild(int i)
Returns null as the header entry has no accessible children.
Overrides:
getAccessibleChild in interface AccessibleContext
Returns:
null.

getAccessibleChildrenCount

public int getAccessibleChildrenCount()
Returns the number of accessible children, zero in this case.
Overrides:
getAccessibleChildrenCount in interface AccessibleContext
Returns:
0

getAccessibleComponent

public AccessibleComponent getAccessibleComponent()
Returns the accessible component for this header entry.
Overrides:
getAccessibleComponent in interface AccessibleContext
Returns:
this.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Returns the accessible context for this header entry.
Specified by:
getAccessibleContext in interface Accessible
Returns:
this.

getAccessibleDescription

public String getAccessibleDescription()
Returns the accessible description.
Overrides:
getAccessibleDescription in interface AccessibleContext
Returns:
The accessible description.

getAccessibleIndexInParent

public int getAccessibleIndexInParent()
Returns the index of this header entry.
Overrides:
getAccessibleIndexInParent in interface AccessibleContext
Returns:
The index of this header entry.

getAccessibleName

public String getAccessibleName()
Returns the accessible name.
Overrides:
getAccessibleName in interface AccessibleContext
Returns:
The accessible name.

getAccessibleRole

public AccessibleRole getAccessibleRole()
Returns the accessible role for the header entry.
Overrides:
getAccessibleRole in interface AccessibleContext
Returns:
The accessible role.

getAccessibleSelection

public AccessibleSelection getAccessibleSelection()
Get any supported accessible selection. The default implementation returns null.
Overrides:
getAccessibleSelection in interface AccessibleContext
Returns:
the supported selection, or null

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Gets the state set of this object. A change in the state of the object will fire a PropertyChangeEvent for ACCESSIBLE_STATE_PROPERTY.
Overrides:
getAccessibleStateSet in interface AccessibleContext
Returns:
the current state of the object

getAccessibleText

public AccessibleText getAccessibleText()
Get any supported accessible text. The default implementation returns null.
Overrides:
getAccessibleText in interface AccessibleContext
Returns:
the supported text, or null

getAccessibleValue

public AccessibleValue getAccessibleValue()
Get any supported accessible value. The default implementation returns null.
Overrides:
getAccessibleValue in interface AccessibleContext
Returns:
the supported value, or null

getBackground

public Color getBackground()
Get the background color of this component.
Specified by:
getBackground in interface AccessibleComponent
Returns:
the background color of this component, or null if not supported

getBounds

public Rectangle getBounds()
Get the bounds of this component relative to its parent - it's width, height, and relative location to its parent.
Specified by:
getBounds in interface AccessibleComponent
Returns:
the bounds of this component, or null if not on screen

getCursor

public Cursor getCursor()
Get the cursor of this component.
Specified by:
getCursor in interface AccessibleComponent
Returns:
the Cursor of this component, or null if not supported

getFont

public Font getFont()
Get the font of this component
Specified by:
getFont in interface AccessibleComponent
Returns:
the font of the component, or null if not supported

getFontMetrics

public FontMetrics getFontMetrics(Font f)
Get the FontMetrics of the specified font in this component.
Specified by:
getFontMetrics in interface AccessibleComponent
Parameters:
Returns:
the metrics for the specified font, or null if not supported
Throws:
NullPointerException - if font is null

getForeground

public Color getForeground()
Get the foreground color of this component.
Specified by:
getForeground in interface AccessibleComponent
Returns:
the foreground color of this component, or null if not supported

getLocale

public Locale getLocale()
Gets the component locale, deferring to the parent if one is not declared.
Overrides:
getLocale in interface AccessibleContext
Returns:
the locale
Throws:
IllegalComponentStateException - if there is no locale or parent

getLocation

public Point getLocation()
Get the location of this component in the parent's coordinate system. The point specified is the top-left corner of this component.
Specified by:
getLocation in interface AccessibleComponent
Returns:
the location in the parent on screen, or null if off-screen

getLocationOnScreen

public Point getLocationOnScreen()
Get the location of this component in the screen's coordinate space. The point specified is the top-left corner of this component.
Specified by:
getLocationOnScreen in interface AccessibleComponent
Returns:
the location on screen, or null if off-screen

getSize

public Dimension getSize()
Get the size of this component - it's width and height.
Specified by:
getSize in interface AccessibleComponent
Returns:
the dimensions of this component, or null if not on screen

isEnabled

public boolean isEnabled()
Indicates whether or not this component is enabled. An object which is enabled also has AccessibleState.ENABLED in its StateSet.
Specified by:
isEnabled in interface AccessibleComponent
Returns:
true if the component is enabled

isFocusTraversable

public boolean isFocusTraversable()
Indicates whether or not this component can accept focus. An object which can accept focus also has AccessibleState.FOCUSABLE in its StateSet.
Specified by:
isFocusTraversable in interface AccessibleComponent
Returns:
true if the component can accept focus

isShowing

public boolean isShowing()
Indicates whether or not this component is visible by checking the visibility of this component and its ancestors. The component may be hidden on screen by another component like pop-up help. An object which is showing on screen also has AccessibleState.SHOWING in its StateSet.
Specified by:
isShowing in interface AccessibleComponent
Returns:
true if component and ancestors are visible

isVisible

public boolean isVisible()
Indicates whether or not this component is visible or intends to be visible although one of its ancestors may not be. An object which is visible also has AccessibleState.VISIBLE in its StateSet. Check isShowing() to see if the object is on screen.
Specified by:
isVisible in interface AccessibleComponent
Returns:
true if the component is visible

removeFocusListener

public void removeFocusListener(FocusListener l)
Specified by:
removeFocusListener in interface AccessibleComponent

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)
Overrides:
removePropertyChangeListener in interface AccessibleContext

requestFocus

public void requestFocus()
Specified by:
requestFocus in interface AccessibleComponent

setAccessibleDescription

public void setAccessibleDescription(String s)
Overrides:
setAccessibleDescription in interface AccessibleContext

setAccessibleName

public void setAccessibleName(String s)
Overrides:
setAccessibleName in interface AccessibleContext

setBackground

public void setBackground(Color c)
Set the background color of this component to the specified color.
Specified by:
setBackground in interface AccessibleComponent
Parameters:

setBounds

public void setBounds(Rectangle r)
Set the bounds of this component to the specified height and width, and relative location to its parent.
Specified by:
setBounds in interface AccessibleComponent
Parameters:
Throws:
NullPointerException - if rectangle is null

setCursor

public void setCursor(Cursor c)
Set the cursor of the component.
Specified by:
setCursor in interface AccessibleComponent
Parameters:

setEnabled

public void setEnabled(boolean b)
Set this component to an enabled or disabled state.
Specified by:
setEnabled in interface AccessibleComponent
Parameters:
b - true to enable the component, else disable it

setFont

public void setFont(Font f)
Set the font of this component.
Specified by:
setFont in interface AccessibleComponent
Parameters:

setForeground

public void setForeground(Color c)
Set the foreground color of this component.
Specified by:
setForeground in interface AccessibleComponent
Parameters:

setLocation

public void setLocation(Point p)
Set the location of this component relative to its parent. The point specified represents the top-left corner of this component.
Specified by:
setLocation in interface AccessibleComponent
Parameters:
Throws:
NullPointerException - if point is null

setSize

public void setSize(Dimension d)
Set the size of this component to the given dimensions.
Specified by:
setSize in interface AccessibleComponent
Parameters:
Throws:
NullPointerException - if dimension is null

setVisible

public void setVisible(boolean b)
Set the visible state of this component.
Specified by:
setVisible in interface AccessibleComponent
Parameters:
b - true to make the component visible, else hide it

JTableHeader.java -- Copyright (C) 2003, 2004, 2005, 2006, Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.