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_DESCRIPTION_PROPERTY, ACCESSIBLE_HYPERTEXT_OFFSET, 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_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)
Adds the specified listener to this component.
void
addPropertyChangeListener(PropertyChangeListener l)
Add a PropertyChangeListener to the listener list.
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 the specified accessible chile.
int
getAccessibleChildrenCount()
Returns the number of accessible children of this object.
AccessibleComponent
getAccessibleComponent()
Get any supported accessible compoent.
AccessibleContext
getAccessibleContext()
If a component supports the Accessibility API then this method should not return null.
String
getAccessibleDescription()
Get the localized description of the object.
int
getAccessibleIndexInParent()
Gets the index of this object within its accessible parent.
String
getAccessibleName()
Get the localized name of the object.
AccessibleRole
getAccessibleRole()
Gets the role of this object.
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)
Removes the specified listener from this component.
void
removePropertyChangeListener(PropertyChangeListener l)
Remove a PropertyChangeListener from the listener list.
void
requestFocus()
If this method is called this component will attempt to gain focus, but if it cannot accept focus nothing happens.
void
setAccessibleDescription(String s)
Set the localized name of the object.
void
setAccessibleName(String s)
Set the localized name of the object.
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, finalize, getClass, 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)
Adds the specified listener to this component.
Specified by:
addFocusListener in interface AccessibleComponent

Parameters:

See Also:
AccessibleComponent.removeFocusListener(FocusListener)


addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)
Add a PropertyChangeListener to the listener list. This listener will be notified of all property changes to the accessible object.
Overrides:
addPropertyChangeListener in interface AccessibleContext

Parameters:
l - the listener to add

See Also:
AccessibleContext.ACCESSIBLE_NAME_PROPERTY, AccessibleContext.ACCESSIBLE_DESCRIPTION_PROPERTY, AccessibleContext.ACCESSIBLE_STATE_PROPERTY, AccessibleContext.ACCESSIBLE_VALUE_PROPERTY, AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY, AccessibleContext.ACCESSIBLE_TEXT_PROPERTY, AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, AccessibleContext.removePropertyChangeListener(PropertyChangeListener)


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

See Also:
AccessibleComponent.getBounds()


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

See Also:
AccessibleAction


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 the specified accessible chile.
Overrides:
getAccessibleChild in interface AccessibleContext

Parameters:
i - the 0-based index to get

Returns:
the child, or null if out of bounds

See Also:
AccessibleContext.getAccessibleChildrenCount()


getAccessibleChildrenCount

public int getAccessibleChildrenCount()
Returns the number of accessible children of this object.
Overrides:
getAccessibleChildrenCount in interface AccessibleContext

Returns:
the number of accessible children

See Also:
AccessibleContext.getAccessibleChild(int)


getAccessibleComponent

public AccessibleComponent getAccessibleComponent()
Get any supported accessible compoent. The default implementation returns null.
Overrides:
getAccessibleComponent in interface AccessibleContext

Returns:
the supported component, or null

See Also:
AccessibleComponent


getAccessibleContext

public AccessibleContext getAccessibleContext()
If a component supports the Accessibility API then this method should not return null. Only classes which must extend an accessible class, but must not itself be accessible, may return null.
Specified by:
getAccessibleContext in interface Accessible

Returns:
the context associated with this accessible object


getAccessibleDescription

public String getAccessibleDescription()
Get the localized description of the object. For example, a 'Cancel' button may be described as "Ignore changes and close dialog box" in en_US.
Overrides:
getAccessibleDescription in interface AccessibleContext

Returns:
the accessible object's description, or null if there is none

See Also:
AccessibleContext.setAccessibleDescription(String)


getAccessibleIndexInParent

public int getAccessibleIndexInParent()
Gets the index of this object within its accessible parent.
Overrides:
getAccessibleIndexInParent in interface AccessibleContext

Returns:
the 0-based index, or -1 if there is no accessible parent

See Also:
AccessibleContext.getAccessibleParent(), AccessibleContext.getAccessibleChildrenCount(), AccessibleContext.getAccessibleChild(int)


getAccessibleName

public String getAccessibleName()
Get the localized name of the object. For example, a label may just return the text of the label, while an entry field for city may return "city" in en_US.
Overrides:
getAccessibleName in interface AccessibleContext

Returns:
the accessible object's name, or null if it is unnamed

See Also:
AccessibleContext.setAccessibleName(String)


getAccessibleRole

public AccessibleRole getAccessibleRole()
Gets the role of this object. For example, a button serves the role of AccessibleRole.PUSH_BUTTON. This allows assistive technologies to funnel similar objects into the same assistance classes. Note that the class is extensible, to define new roles if necessary.
Overrides:
getAccessibleRole in interface AccessibleContext

Returns:
the role of the object

See Also:
AccessibleRole


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

See Also:
AccessibleSelection


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

See Also:
AccessibleState, AccessibleStateSet, AccessibleContext.addPropertyChangeListener(PropertyChangeListener)


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

See Also:
AccessibleText


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

See Also:
AccessibleValue


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

See Also:
AccessibleComponent.setBackground(Color)


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

See Also:
AccessibleComponent.contains(Point)


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

See Also:
AccessibleComponent.setCursor(Cursor)


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

See Also:
AccessibleComponent.setFont(Font)


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

See Also:
AccessibleComponent.getFont()


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

See Also:
AccessibleComponent.setForeground(Color)


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

See Also:
AccessibleComponent.getBounds(), AccessibleComponent.getLocationOnScreen(), AccessibleComponent.setLocation(Point)


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

See Also:
AccessibleComponent.getBounds(), AccessibleComponent.getLocation()


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

See Also:
AccessibleComponent.setSize(Dimension)


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

See Also:
AccessibleComponent.setEnabled(boolean), AccessibleContext.getAccessibleStateSet(), AccessibleState.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

See Also:
AccessibleContext.getAccessibleStateSet(), AccessibleState.FOCUSABLE, AccessibleState.FOCUSED


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

See Also:
AccessibleComponent.isVisible(), AccessibleComponent.setVisible(boolean), AccessibleContext.getAccessibleStateSet(), AccessibleState.SHOWING


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

See Also:
AccessibleComponent.setVisible(boolean), AccessibleContext.getAccessibleStateSet(), AccessibleState.VISIBLE


removeFocusListener

public void removeFocusListener(FocusListener l)
Removes the specified listener from this component.
Specified by:
removeFocusListener in interface AccessibleComponent

Parameters:

See Also:
AccessibleComponent.addFocusListener(FocusListener)


removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)
Remove a PropertyChangeListener from the listener list.
Overrides:
removePropertyChangeListener in interface AccessibleContext

Parameters:
l - the listener to remove

See Also:
AccessibleContext.addPropertyChangeListener(PropertyChangeListener)


requestFocus

public void requestFocus()
If this method is called this component will attempt to gain focus, but if it cannot accept focus nothing happens. On success, the StateSet will contain AccessibleState.FOCUSED
Specified by:
requestFocus in interface AccessibleComponent

See Also:
AccessibleComponent.isFocusTraversable(), AccessibleState.FOCUSED


setAccessibleDescription

public void setAccessibleDescription(String s)
Set the localized name of the object. This will fire a PropertyChangeEvent with ACCESSIBLE_DESCRIPTION_PROPERTY.
Overrides:
setAccessibleDescription in interface AccessibleContext

Parameters:
s - the new description

See Also:
AccessibleContext.getAccessibleDescription(), AccessibleContext.addPropertyChangeListener(PropertyChangeListener)


setAccessibleName

public void setAccessibleName(String s)
Set the localized name of the object. This will fire a PropertyChangeEvent with ACCESSIBLE_NAME_PROPERTY.
Overrides:
setAccessibleName in interface AccessibleContext

Parameters:
s - the new name

See Also:
AccessibleContext.getAccessibleName(), AccessibleContext.addPropertyChangeListener(PropertyChangeListener)


setBackground

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

Parameters:

See Also:
AccessibleComponent.getBackground()


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:

See Also:
AccessibleComponent.getCursor()


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

See Also:
AccessibleComponent.isEnabled()


setFont

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

Parameters:

See Also:
AccessibleComponent.getFont()


setForeground

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

Parameters:

See Also:
AccessibleComponent.getForeground()


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

See Also:
AccessibleComponent.getLocation()


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

See Also:
AccessibleComponent.getSize()


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

See Also:
AccessibleComponent.isVisible()


JTableHeader.java -- Copyright (C) 2003, 2004, 2005 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.