|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.accessibility.AccessibleContext
javax.swing.JList.AccessibleJList.AccessibleJListChild
protected class JList.AccessibleJList.AccessibleJListChild
Provides accessibility support for list elements in JLists.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
JList.AccessibleJList.AccessibleJListChild(JList list,
int index)
Creates a new instance of AccessibleJListChild. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JList.AccessibleJList.AccessibleJListChild(JList list,
int index)
AccessibleJListChild.
list - the list of which this is an accessible childindex - the list index for this child| Method Detail |
|---|
public AccessibleContext getAccessibleContext()
this since AccessibleJListChilds are their
own accessible contexts.
getAccessibleContext in interface Accessiblethispublic Color getBackground()
JList itself since the background
cannot be set on list children individually
getBackground in interface AccessibleComponentAccessibleComponent.setBackground(Color)public void setBackground(Color color)
setBackground in interface AccessibleComponentcolor - not used here.AccessibleComponent.getBackground()public Color getForeground()
JList itself since the foreground
cannot be set on list children individually.
getForeground in interface AccessibleComponentAccessibleComponent.setForeground(Color)public void setForeground(Color color)
setForeground in interface AccessibleComponentcolor - not used here.AccessibleComponent.getForeground()public Cursor getCursor()
getCursor in interface AccessibleComponentAccessibleComponent.setCursor(Cursor)public void setCursor(Cursor cursor)
setCursor in interface AccessibleComponentcursor - 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 AccessibleComponentJListAccessibleComponent.setFont(Font)public void setFont(Font font)
setFont in interface AccessibleComponentfont - not used hereAccessibleComponent.getFont()public FontMetrics getFontMetrics(Font font)
JList.
getFontMetrics in interface AccessibleComponentfont - the font for which the font metrics is queried
AccessibleComponent.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 AccessibleComponenttrue if the parent JList is enabled,
false otherwiseAccessibleComponent.setEnabled(boolean),
AccessibleContext.getAccessibleStateSet(),
AccessibleState.ENABLEDpublic void setEnabled(boolean b)
setEnabled in interface 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 AccessibleComponenttrue if this list child is visible,
false otherwiseAccessibleComponent.setVisible(boolean),
AccessibleContext.getAccessibleStateSet(),
AccessibleState.VISIBLEpublic void setVisible(boolean b)
setVisible in interface 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 AccessibleComponenttrue if this list child is currently showing on
screen and false otherwiseAccessibleComponent.isVisible(),
AccessibleComponent.setVisible(boolean),
AccessibleContext.getAccessibleStateSet(),
AccessibleState.SHOWINGpublic 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 AccessibleComponentpoint - the Point to locate
true if this list child covers the screen location
point , false otherwiseAccessibleComponent.getBounds()public Point getLocationOnScreen()
getLocationOnScreen in interface AccessibleComponentAccessibleComponent.getBounds(),
AccessibleComponent.getLocation()public Point getLocation()
getLocation in interface AccessibleComponentJList.indexToLocation(int)public void setLocation(Point point)
setLocation in interface AccessibleComponentpoint - not used hereAccessibleComponent.getLocation()public Rectangle getBounds()
getBounds in interface AccessibleComponentJList.getCellBounds(int, int)public void setBounds(Rectangle rectangle)
setBounds in interface AccessibleComponentrectangle - not used herepublic Dimension getSize()
getSize in interface AccessibleComponentAccessibleComponent.setSize(Dimension)public void setSize(Dimension dimension)
setSize in interface AccessibleComponentdimension - not used hereAccessibleComponent.getSize()public Accessible getAccessibleAt(Point point)
null because list children do not have children
themselves
getAccessibleAt in interface AccessibleComponentpoint - the location within this component's coordinate system
nullpublic boolean isFocusTraversable()
true since list children are focus traversable.
isFocusTraversable in interface AccessibleComponentAccessibleContext.getAccessibleStateSet(),
AccessibleState.FOCUSABLE,
AccessibleState.FOCUSEDpublic void requestFocus()
requestFocus in interface AccessibleComponentAccessibleComponent.isFocusTraversable(),
AccessibleState.FOCUSEDpublic void addFocusListener(FocusListener listener)
addFocusListener in interface AccessibleComponentlistener - the focus listener to addAccessibleComponent.removeFocusListener(FocusListener)public void removeFocusListener(FocusListener listener)
removeFocusListener in interface AccessibleComponentlistener - the focus listener to removeAccessibleComponent.addFocusListener(FocusListener)public AccessibleRole getAccessibleRole()
AccessibleRole.LABEL.
getAccessibleRole in class AccessibleContextAccessibleRole.LABELAccessibleRolepublic AccessibleStateSet getAccessibleStateSet()
getAccessibleStateSet in class AccessibleContextAccessibleState,
AccessibleStateSet,
AccessibleContext.addPropertyChangeListener(PropertyChangeListener)public int getAccessibleIndexInParent()
getAccessibleIndexInParent in class AccessibleContextAccessibleContext.getAccessibleParent(),
AccessibleContext.getAccessibleChildrenCount(),
AccessibleContext.getAccessibleChild(int)public int getAccessibleChildrenCount()
0 since list children don't have children
themselves.
getAccessibleChildrenCount in class AccessibleContext0AccessibleContext.getAccessibleChild(int)public Accessible getAccessibleChild(int i)
null since list children don't have children
themselves.
getAccessibleChild in class AccessibleContexti - the 0-based index to get
nullAccessibleContext.getAccessibleChildrenCount()public Locale getLocale()
getLocale in class AccessibleContextpublic void addPropertyChangeListener(PropertyChangeListener l)
addPropertyChangeListener in class 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(PropertyChangeListener l)
removePropertyChangeListener in class AccessibleContextl - not used hereAccessibleContext.addPropertyChangeListener(PropertyChangeListener)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||