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.JList.AccessibleJList.AccessibleJListChild
protected class JList.AccessibleJList.AccessibleJListChild
extends AccessibleContext
implements Accessible, AccessibleComponent
JList
s.
Field Summary |
Constructor Summary | |
|
Method Summary | |
void |
|
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 | |
void |
|
Methods inherited from class java.lang.Object | |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
public AccessibleJListChild(JList list, int index)
Creates a new instance ofAccessibleJListChild
.
- Parameters:
list
- the list of which this is an accessible childindex
- the list index for this child
public void addFocusListener(FocusListener listener)
Adds a focus listener to the parent list. List children do not have their own focus management.
- Specified by:
- addFocusListener in interface AccessibleComponent
- Parameters:
listener
- the focus listener to add
public void addPropertyChangeListener(PropertyChangeListener l)
This method does nothing, list children are transient accessible objects which means that they don't fire property change events.
- Overrides:
- addPropertyChangeListener in interface AccessibleContext
- Parameters:
l
- not used here
public boolean contains(Point point)
Returnstrue
if this list child covers the screen locationpoint
(relative to theJList
coordinate system,false
otherwise.
- Specified by:
- contains in interface AccessibleComponent
- Returns:
true
if this list child covers the screen locationpoint
,false
otherwise
public Accessible getAccessibleAt(Point point)
Returnsnull
because list children do not have children themselves
- Specified by:
- getAccessibleAt in interface AccessibleComponent
- Returns:
null
public Accessible getAccessibleChild(int i)
Returnsnull
since list children don't have children themselves.
- Overrides:
- getAccessibleChild in interface AccessibleContext
- Returns:
null
public int getAccessibleChildrenCount()
Returns0
since list children don't have children themselves.
- Overrides:
- getAccessibleChildrenCount in interface AccessibleContext
- Returns:
0
public AccessibleContext getAccessibleContext()
Returns the accessible context of this object. Returnsthis
sinceAccessibleJListChild
s are their own accessible contexts.
- Specified by:
- getAccessibleContext in interface Accessible
- Returns:
- the accessible context of this object,
this
public int getAccessibleIndexInParent()
Returns the index of this list child within it's parent list.
- Overrides:
- getAccessibleIndexInParent in interface AccessibleContext
- Returns:
- the index of this list child within it's parent list
public AccessibleRole getAccessibleRole()
Returns the accessible role of this list item, which isAccessibleRole.LABEL
.
- Overrides:
- getAccessibleRole in interface AccessibleContext
- Returns:
AccessibleRole.LABEL
public AccessibleStateSet getAccessibleStateSet()
Returns the accessible state set of this list item.
- Overrides:
- getAccessibleStateSet in interface AccessibleContext
- Returns:
- the accessible state set of this list item
public Color getBackground()
Returns the background color for this list child. This returns the background of theJList
itself since the background cannot be set on list children individually
- Specified by:
- getBackground in interface AccessibleComponent
- Returns:
- the background color for this list child
public Rectangle getBounds()
Returns the bounds of this list child.
- Specified by:
- getBounds in interface AccessibleComponent
- Returns:
- the bounds of this list child
- See Also:
JList.getCellBounds(int,int)
public Cursor getCursor()
Returns the cursor for this list child.
- Specified by:
- getCursor in interface AccessibleComponent
- Returns:
- the cursor for this list child
public Font getFont()
Returns the font of theJList
since it is not possible to set fonts for list children individually.
- Specified by:
- getFont in interface AccessibleComponent
- Returns:
- the font of the
JList
public FontMetrics getFontMetrics(Font font)
Returns the font metrics for the specified font. This method forwards to the parentJList
.
- Specified by:
- getFontMetrics in interface AccessibleComponent
- Parameters:
font
- the font for which the font metrics is queried
- Returns:
- the font metrics for the specified font
public Color getForeground()
Returns the foreground color for this list child. This returns the background of theJList
itself since the foreground cannot be set on list children individually.
- Specified by:
- getForeground in interface AccessibleComponent
- Returns:
- the background color for this list child
public Locale getLocale()
Returns the locale of this component. This call is forwarded to the parent list since list children don't have a separate locale setting.
- Overrides:
- getLocale in interface AccessibleContext
- Returns:
- the locale of this component
public Point getLocation()
Returns the screen location of this list child relative to it's parent.
- Specified by:
- getLocation in interface AccessibleComponent
- Returns:
- the location of this list child relative to it's parent
- See Also:
JList.indexToLocation(int)
public Point getLocationOnScreen()
Returns the absolute screen location of this list child.
- Specified by:
- getLocationOnScreen in interface AccessibleComponent
- Returns:
- the absolute screen location of this list child
public Dimension getSize()
Returns the size of this list child.
- Specified by:
- getSize in interface AccessibleComponent
- Returns:
- the size of this list child
public boolean isEnabled()
Returnstrue
if the parentJList
is enabled,false
otherwise. The list children cannot have an enabled flag set individually.
- Specified by:
- isEnabled in interface AccessibleComponent
- Returns:
true
if the parentJList
is enabled,false
otherwise
public boolean isFocusTraversable()
Returnstrue
since list children are focus traversable.
- Specified by:
- isFocusTraversable in interface AccessibleComponent
- Returns:
- true
public boolean isShowing()
Returnstrue
if this list child is currently showing on screen andfalse
otherwise. The list child is showing if it is visible and if it's parent JList is currently showing.
- Specified by:
- isShowing in interface AccessibleComponent
- Returns:
true
if this list child is currently showing on screen andfalse
otherwise
public boolean isVisible()
Returnstrue
if this list child is visible,false
otherwise. The value of this property depends onJList.getFirstVisibleIndex()
andJList.getLastVisibleIndex()
.
- Specified by:
- isVisible in interface AccessibleComponent
- Returns:
true
if this list child is visible,false
otherwise
public void removeFocusListener(FocusListener listener)
Removes a focus listener from the parent list. List children do not have their own focus management.
- Specified by:
- removeFocusListener in interface AccessibleComponent
- Parameters:
listener
- the focus listener to remove
public void removePropertyChangeListener(PropertyChangeListener l)
This method does nothing, list children are transient accessible objects which means that they don't fire property change events.
- Overrides:
- removePropertyChangeListener in interface AccessibleContext
- Parameters:
l
- not used here
public void requestFocus()
Requests focus on the parent list. List children cannot request focus individually.
- Specified by:
- requestFocus in interface AccessibleComponent
public void setBackground(Color color)
Calling this method has no effect, since the background color cannot be set on list children individually.
- Specified by:
- setBackground in interface AccessibleComponent
- Parameters:
color
- not used here.
public void setBounds(Rectangle rectangle)
Does nothing since the bounds cannot be set on list children individually.
- Specified by:
- setBounds in interface AccessibleComponent
- Parameters:
rectangle
- not used here
public void setCursor(Cursor cursor)
Sets the cursor for this list child.
- Specified by:
- setCursor in interface AccessibleComponent
public void setEnabled(boolean b)
Does nothing since the enabled flag cannot be set for list children individually.
- Specified by:
- setEnabled in interface AccessibleComponent
- Parameters:
b
- not used here
public void setFont(Font font)
Does nothing since it is not possible to set the font on list children individually.
- Specified by:
- setFont in interface AccessibleComponent
- Parameters:
font
- not used here
public void setForeground(Color color)
Calling this method has no effect, since the foreground color cannot be set on list children individually.
- Specified by:
- setForeground in interface AccessibleComponent
- Parameters:
color
- not used here.
public void setLocation(Point point)
Does nothing since the screen location cannot be set on list children explictitly.
- Specified by:
- setLocation in interface AccessibleComponent
- Parameters:
point
- not used here
public void setSize(Dimension dimension)
Does nothing since the size cannot be set on list children individually.
- Specified by:
- setSize in interface AccessibleComponent
- Parameters:
dimension
- not used here
public void setVisible(boolean b)
The value of the visible property cannot be modified, so this method does nothing.
- Specified by:
- setVisible in interface AccessibleComponent
- Parameters:
b
- not used here