protected class JList.AccessibleJList.AccessibleJListChild extends javax.accessibility.AccessibleContext implements javax.accessibility.Accessible, javax.accessibility.AccessibleComponent
JLists.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 |
|---|
JList.AccessibleJList.AccessibleJListChild(JList list,
int index)
Creates a new instance of
AccessibleJListChild. |
| Modifier and Type | Method and Description |
|---|---|
void |
addFocusListener(java.awt.event.FocusListener listener)
Adds a focus listener to the parent list.
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
This method does
nothing, list children are transient accessible objects which means
that they don't fire property change events.
|
boolean |
contains(java.awt.Point point)
Returns
true if this list child covers the screen location
point (relative to the JList coordinate
system, false otherwise. |
javax.accessibility.Accessible |
getAccessibleAt(java.awt.Point point)
Returns
null because list children do not have children
themselves |
javax.accessibility.Accessible |
getAccessibleChild(int i)
Returns
null since list children don't have children
themselves. |
int |
getAccessibleChildrenCount()
Returns
0 since list children don't have children
themselves. |
javax.accessibility.AccessibleContext |
getAccessibleContext()
Returns the accessible context of this object.
|
int |
getAccessibleIndexInParent()
Returns the index of this list child within it's parent list.
|
javax.accessibility.AccessibleRole |
getAccessibleRole()
Returns the accessible role of this list item, which is
AccessibleRole.LABEL. |
javax.accessibility.AccessibleStateSet |
getAccessibleStateSet()
Returns the accessible state set of this list item.
|
java.awt.Color |
getBackground()
Returns the background color for this list child.
|
java.awt.Rectangle |
getBounds()
Returns the bounds of this list child.
|
java.awt.Cursor |
getCursor()
Returns the cursor for this list child.
|
java.awt.Font |
getFont()
Returns the font of the
JList since it is not possible to
set fonts for list children individually. |
java.awt.FontMetrics |
getFontMetrics(java.awt.Font font)
Returns the font metrics for the specified font.
|
java.awt.Color |
getForeground()
Returns the foreground color for this list child.
|
java.util.Locale |
getLocale()
Returns the locale of this component.
|
java.awt.Point |
getLocation()
Returns the screen location of this list child relative to it's parent.
|
java.awt.Point |
getLocationOnScreen()
Returns the absolute screen location of this list child.
|
java.awt.Dimension |
getSize()
Returns the size of this list child.
|
boolean |
isEnabled()
Returns
true if the parent JList is enabled,
false otherwise. |
boolean |
isFocusTraversable()
Returns
true since list children are focus traversable. |
boolean |
isShowing()
Returns
true if this list child is currently showing on
screen and false otherwise. |
boolean |
isVisible()
Returns
true if this list child is visible,
false otherwise. |
void |
removeFocusListener(java.awt.event.FocusListener listener)
Removes a focus listener from the parent list.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
This method does
nothing, list children are transient accessible objects which means
that they don't fire property change events.
|
void |
requestFocus()
Requests focus on the parent list.
|
void |
setBackground(java.awt.Color color)
Calling this method has no effect, since the background color cannot be
set on list children individually.
|
void |
setBounds(java.awt.Rectangle rectangle)
Does nothing since the bounds cannot be set on list children
individually.
|
void |
setCursor(java.awt.Cursor cursor)
Sets the cursor for this list child.
|
void |
setEnabled(boolean b)
Does nothing since the enabled flag cannot be set for list children
individually.
|
void |
setFont(java.awt.Font font)
Does nothing since it is not possible to set the font on list children
individually.
|
void |
setForeground(java.awt.Color color)
Calling this method has no effect, since the foreground color cannot be
set on list children individually.
|
void |
setLocation(java.awt.Point point)
Does nothing since the screen location cannot be set on list children
explictitly.
|
void |
setSize(java.awt.Dimension dimension)
Does nothing since the size cannot be set on list children
individually.
|
void |
setVisible(boolean b)
The value of the visible property cannot be modified, so this method
does nothing.
|
firePropertyChange, getAccessibleAction, getAccessibleComponent, getAccessibleDescription, getAccessibleEditableText, getAccessibleIcon, getAccessibleName, getAccessibleParent, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParentpublic JList.AccessibleJList.AccessibleJListChild(JList list, int index)
AccessibleJListChild.list - the list of which this is an accessible childindex - the list index for this childpublic javax.accessibility.AccessibleContext getAccessibleContext()
this since AccessibleJListChilds are their
own accessible contexts.getAccessibleContext in interface javax.accessibility.Accessiblethispublic java.awt.Color getBackground()
JList itself since the background
cannot be set on list children individuallygetBackground in interface javax.accessibility.AccessibleComponentAccessibleComponent.setBackground(Color)public void setBackground(java.awt.Color color)
setBackground in interface javax.accessibility.AccessibleComponentcolor - not used here.AccessibleComponent.getBackground()public java.awt.Color getForeground()
JList itself since the foreground
cannot be set on list children individually.getForeground in interface javax.accessibility.AccessibleComponentAccessibleComponent.setForeground(Color)public void setForeground(java.awt.Color color)
setForeground in interface javax.accessibility.AccessibleComponentcolor - not used here.AccessibleComponent.getForeground()public java.awt.Cursor getCursor()
getCursor in interface javax.accessibility.AccessibleComponentAccessibleComponent.setCursor(Cursor)public void setCursor(java.awt.Cursor cursor)
setCursor in interface javax.accessibility.AccessibleComponentcursor - the graphical representation of the cursor to useAccessibleComponent.getCursor()public java.awt.Font getFont()
JList since it is not possible to
set fonts for list children individually.getFont in interface javax.accessibility.AccessibleComponentJListAccessibleComponent.setFont(Font)public void setFont(java.awt.Font font)
setFont in interface javax.accessibility.AccessibleComponentfont - not used hereAccessibleComponent.getFont()public java.awt.FontMetrics getFontMetrics(java.awt.Font font)
JList.getFontMetrics in interface javax.accessibility.AccessibleComponentfont - the font for which the font metrics is queriedAccessibleComponent.getFont()public boolean isEnabled()
true if the parent JList is enabled,
false otherwise. The list children cannot have an enabled
flag set individually.isEnabled in interface javax.accessibility.AccessibleComponenttrue if the parent JList is enabled,
false otherwiseAccessibleComponent.setEnabled(boolean),
AccessibleContext.getAccessibleStateSet(),
AccessibleState.ENABLEDpublic void setEnabled(boolean b)
setEnabled in interface javax.accessibility.AccessibleComponentb - not used hereAccessibleComponent.isEnabled()public boolean isVisible()
true if this list child is visible,
false otherwise. The value of this property depends
on JList.getFirstVisibleIndex() and
JList.getLastVisibleIndex().isVisible in interface javax.accessibility.AccessibleComponenttrue if this list child is visible,
false otherwiseAccessibleComponent.setVisible(boolean),
AccessibleContext.getAccessibleStateSet(),
AccessibleState.VISIBLEpublic void setVisible(boolean b)
setVisible in interface javax.accessibility.AccessibleComponentb - not used hereAccessibleComponent.isVisible()public boolean isShowing()
true if this list child is currently showing on
screen and false otherwise. The list child is showing if
it is visible and if it's parent JList is currently showing.isShowing in interface javax.accessibility.AccessibleComponenttrue if this list child is currently showing on
screen and false otherwiseAccessibleComponent.isVisible(),
AccessibleComponent.setVisible(boolean),
AccessibleContext.getAccessibleStateSet(),
AccessibleState.SHOWINGpublic boolean contains(java.awt.Point point)
true if this list child covers the screen location
point (relative to the JList coordinate
system, false otherwise.contains in interface javax.accessibility.AccessibleComponentpoint - the Point to locatetrue if this list child covers the screen location
point , false otherwiseAccessibleComponent.getBounds()public java.awt.Point getLocationOnScreen()
getLocationOnScreen in interface javax.accessibility.AccessibleComponentAccessibleComponent.getBounds(),
AccessibleComponent.getLocation()public java.awt.Point getLocation()
getLocation in interface javax.accessibility.AccessibleComponentJList.indexToLocation(int)public void setLocation(java.awt.Point point)
setLocation in interface javax.accessibility.AccessibleComponentpoint - not used hereAccessibleComponent.getLocation()public java.awt.Rectangle getBounds()
getBounds in interface javax.accessibility.AccessibleComponentJList.getCellBounds(int, int)public void setBounds(java.awt.Rectangle rectangle)
setBounds in interface javax.accessibility.AccessibleComponentrectangle - not used herepublic java.awt.Dimension getSize()
getSize in interface javax.accessibility.AccessibleComponentAccessibleComponent.setSize(Dimension)public void setSize(java.awt.Dimension dimension)
setSize in interface javax.accessibility.AccessibleComponentdimension - not used hereAccessibleComponent.getSize()public javax.accessibility.Accessible getAccessibleAt(java.awt.Point point)
null because list children do not have children
themselvesgetAccessibleAt in interface javax.accessibility.AccessibleComponentpoint - the location within this component's coordinate systemnullpublic boolean isFocusTraversable()
true since list children are focus traversable.isFocusTraversable in interface javax.accessibility.AccessibleComponentAccessibleContext.getAccessibleStateSet(),
AccessibleState.FOCUSABLE,
AccessibleState.FOCUSEDpublic void requestFocus()
requestFocus in interface javax.accessibility.AccessibleComponentAccessibleComponent.isFocusTraversable(),
AccessibleState.FOCUSEDpublic void addFocusListener(java.awt.event.FocusListener listener)
addFocusListener in interface javax.accessibility.AccessibleComponentlistener - the focus listener to addAccessibleComponent.removeFocusListener(FocusListener)public void removeFocusListener(java.awt.event.FocusListener listener)
removeFocusListener in interface javax.accessibility.AccessibleComponentlistener - the focus listener to removeAccessibleComponent.addFocusListener(FocusListener)public javax.accessibility.AccessibleRole getAccessibleRole()
AccessibleRole.LABEL.getAccessibleRole in class javax.accessibility.AccessibleContextAccessibleRole.LABELAccessibleRolepublic javax.accessibility.AccessibleStateSet getAccessibleStateSet()
getAccessibleStateSet in class javax.accessibility.AccessibleContextAccessibleState,
AccessibleStateSet,
AccessibleContext.addPropertyChangeListener(PropertyChangeListener)public int getAccessibleIndexInParent()
getAccessibleIndexInParent in class javax.accessibility.AccessibleContextAccessibleContext.getAccessibleParent(),
AccessibleContext.getAccessibleChildrenCount(),
AccessibleContext.getAccessibleChild(int)public int getAccessibleChildrenCount()
0 since list children don't have children
themselves.getAccessibleChildrenCount in class javax.accessibility.AccessibleContext0AccessibleContext.getAccessibleChild(int)public javax.accessibility.Accessible getAccessibleChild(int i)
null since list children don't have children
themselves.getAccessibleChild in class javax.accessibility.AccessibleContexti - the 0-based index to getnullAccessibleContext.getAccessibleChildrenCount()public java.util.Locale getLocale()
getLocale in class javax.accessibility.AccessibleContextpublic void addPropertyChangeListener(java.beans.PropertyChangeListener l)
addPropertyChangeListener in class javax.accessibility.AccessibleContextl - not used hereAccessibleContext.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)public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
removePropertyChangeListener in class javax.accessibility.AccessibleContextl - not used hereAccessibleContext.addPropertyChangeListener(PropertyChangeListener)