protected class JList.AccessibleJList.AccessibleJListChild extends AccessibleContext implements Accessible, AccessibleComponent
JList
s.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(FocusListener listener)
Adds a focus listener to the parent list.
|
void |
addPropertyChangeListener(PropertyChangeListener l)
This method does
nothing, list children are transient accessible objects which means
that they don't fire property change events.
|
boolean |
contains(Point point)
Returns
true if this list child covers the screen location
point (relative to the JList coordinate
system, false otherwise. |
Accessible |
getAccessibleAt(Point point)
Returns
null because list children do not have children
themselves |
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. |
AccessibleContext |
getAccessibleContext()
Returns the accessible context of this object.
|
int |
getAccessibleIndexInParent()
Returns the index of this list child within it's parent list.
|
AccessibleRole |
getAccessibleRole()
Returns the accessible role of this list item, which is
AccessibleRole.LABEL . |
AccessibleStateSet |
getAccessibleStateSet()
Returns the accessible state set of this list item.
|
Color |
getBackground()
Returns the background color for this list child.
|
Rectangle |
getBounds()
Returns the bounds of this list child.
|
Cursor |
getCursor()
Returns the cursor for this list child.
|
Font |
getFont()
Returns the font of the
JList since it is not possible to
set fonts for list children individually. |
FontMetrics |
getFontMetrics(Font font)
Returns the font metrics for the specified font.
|
Color |
getForeground()
Returns the foreground color for this list child.
|
Locale |
getLocale()
Returns the locale of this component.
|
Point |
getLocation()
Returns the screen location of this list child relative to it's parent.
|
Point |
getLocationOnScreen()
Returns the absolute screen location of this list child.
|
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(FocusListener listener)
Removes a focus listener from the parent list.
|
void |
removePropertyChangeListener(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(Color color)
Calling this method has no effect, since the background color cannot be
set on list children individually.
|
void |
setBounds(Rectangle rectangle)
Does nothing since the bounds cannot be set on list children
individually.
|
void |
setCursor(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(Font font)
Does nothing since it is not possible to set the font on list children
individually.
|
void |
setForeground(Color color)
Calling this method has no effect, since the foreground color cannot be
set on list children individually.
|
void |
setLocation(Point point)
Does nothing since the screen location cannot be set on list children
explictitly.
|
void |
setSize(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, setAccessibleParent
public JList.AccessibleJList.AccessibleJListChild(JList list, int index)
AccessibleJListChild
.list
- the list of which this is an accessible childindex
- the list index for this childpublic AccessibleContext getAccessibleContext()
this
since AccessibleJListChild
s are their
own accessible contexts.getAccessibleContext
in interface Accessible
this
public Color getBackground()
JList
itself since the background
cannot be set on list children individuallygetBackground
in interface AccessibleComponent
AccessibleComponent.setBackground(Color)
public void setBackground(Color color)
setBackground
in interface AccessibleComponent
color
- not used here.AccessibleComponent.getBackground()
public Color getForeground()
JList
itself since the foreground
cannot be set on list children individually.getForeground
in interface AccessibleComponent
AccessibleComponent.setForeground(Color)
public void setForeground(Color color)
setForeground
in interface AccessibleComponent
color
- not used here.AccessibleComponent.getForeground()
public Cursor getCursor()
getCursor
in interface AccessibleComponent
AccessibleComponent.setCursor(Cursor)
public void setCursor(Cursor cursor)
setCursor
in interface AccessibleComponent
cursor
- the graphical representation of the cursor to useAccessibleComponent.getCursor()
public Font getFont()
JList
since it is not possible to
set fonts for list children individually.getFont
in interface AccessibleComponent
JList
AccessibleComponent.setFont(Font)
public void setFont(Font font)
setFont
in interface AccessibleComponent
font
- not used hereAccessibleComponent.getFont()
public FontMetrics getFontMetrics(Font font)
JList
.getFontMetrics
in interface AccessibleComponent
font
- 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 AccessibleComponent
true
if the parent JList
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 list child is visible,
false
otherwise. The value of this property depends
on JList.getFirstVisibleIndex()
and
JList.getLastVisibleIndex()
.isVisible
in interface AccessibleComponent
true
if this list child is visible,
false
otherwiseAccessibleComponent.setVisible(boolean)
,
AccessibleContext.getAccessibleStateSet()
,
AccessibleState.VISIBLE
public void setVisible(boolean b)
setVisible
in interface AccessibleComponent
b
- 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 AccessibleComponent
true
if this list child is currently showing on
screen and false
otherwiseAccessibleComponent.isVisible()
,
AccessibleComponent.setVisible(boolean)
,
AccessibleContext.getAccessibleStateSet()
,
AccessibleState.SHOWING
public boolean contains(Point point)
true
if this list child covers the screen location
point
(relative to the JList
coordinate
system, false
otherwise.contains
in interface AccessibleComponent
point
- the Point to locatetrue
if this list child covers the screen location
point
, false
otherwiseAccessibleComponent.getBounds()
public Point getLocationOnScreen()
getLocationOnScreen
in interface AccessibleComponent
AccessibleComponent.getBounds()
,
AccessibleComponent.getLocation()
public Point getLocation()
getLocation
in interface AccessibleComponent
JList.indexToLocation(int)
public void setLocation(Point point)
setLocation
in interface AccessibleComponent
point
- not used hereAccessibleComponent.getLocation()
public Rectangle getBounds()
getBounds
in interface AccessibleComponent
JList.getCellBounds(int, int)
public void setBounds(Rectangle rectangle)
setBounds
in interface AccessibleComponent
rectangle
- not used herepublic Dimension getSize()
getSize
in interface AccessibleComponent
AccessibleComponent.setSize(Dimension)
public void setSize(Dimension dimension)
setSize
in interface AccessibleComponent
dimension
- not used hereAccessibleComponent.getSize()
public Accessible getAccessibleAt(Point point)
null
because list children do not have children
themselvesgetAccessibleAt
in interface AccessibleComponent
point
- the location within this component's coordinate systemnull
public boolean isFocusTraversable()
true
since list children are focus traversable.isFocusTraversable
in interface AccessibleComponent
AccessibleContext.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 focus listener to removeAccessibleComponent.addFocusListener(FocusListener)
public AccessibleRole getAccessibleRole()
AccessibleRole.LABEL
.getAccessibleRole
in class AccessibleContext
AccessibleRole.LABEL
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
since list children don't have children
themselves.getAccessibleChildrenCount
in class AccessibleContext
0
AccessibleContext.getAccessibleChild(int)
public Accessible getAccessibleChild(int i)
null
since list children don't have children
themselves.getAccessibleChild
in class AccessibleContext
i
- the 0-based index to getnull
AccessibleContext.getAccessibleChildrenCount()
public Locale getLocale()
getLocale
in class AccessibleContext
public void addPropertyChangeListener(PropertyChangeListener l)
addPropertyChangeListener
in class AccessibleContext
l
- 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(PropertyChangeListener l)
removePropertyChangeListener
in class AccessibleContext
l
- not used hereAccessibleContext.addPropertyChangeListener(PropertyChangeListener)