All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface com.sun.java.accessibility.Accessible

public interface Accessible

Interface Accessible is a set of methods that can be implemented by user interface classes to make them more accessible. An assistive technology can check if an object implements the Accessible interface by using the 'instanceof' operator.


Method Index

 o addAccessibleSelection(int)
Adds the nth selected item in the object to the object's selection.
 o addFocusListener(FocusListener)
Adds the specified focus listener to receive focus events from this component.
 o clearAccessibleSelection()
Clears the selection in the object, so that nothing in the object is selected.
 o contains(Point)
Checks whether the specified Point is within this object's bounds, where the Point is relative to the coordinate system of the object.
 o doAccessibleAction(int)
Perform the nth Action on the object
 o getAccessibleActionCount()
Returns the number of items Actions available in this object If there is more than one, the first one is the "default" action (if any action is considered "default").
 o getAccessibleActionDescription(int)
Return a description of the nth action of the object.
 o getAccessibleAt(Point)
Returns the Accessible child contained at the local coordinate Point, if one exists.
 o getAccessibleChild(int)
Return the nth Accessible child of the object.
 o getAccessibleChildrenCount()
Returns the number of accessible children in the object.
 o getAccessibleDescription()
Get the accessible description of this object.
 o getAccessibleName()
Get the accessible name of this object.
 o getAccessibleParent()
Get the Accessible parent of this object.
 o getAccessibleRole()
Get the role of this object.
 o getAccessibleSelection(int)
Returns an Accessible representing the nth selected item in the object.
 o getAccessibleSelectionCount()
Returns the number of items currently selected.
 o getAccessibleStateSet()
Get the state set of this object.
 o getAccessibleText()
Gets the AccessibleText interface for the component.
 o getAccessibleValue()
Get the value of this object as a String.
 o getBackground()
Get the background color of this object.
 o getBounds()
Returns the current bounds of this object
 o getCursor()
Get the Cursor of this object.
 o getFont()
Get the Font of this object.
 o getFontMetrics(Font)
Get the FontMetrics of this object.
 o getForeground()
Get the foreground color of this object.
 o getLocale()
Gets the locale of the component.
 o getLocation()
Returns the location of the object relative to parent.
 o getLocationOnScreen()
Returns the location of the object on the screen.
 o getNextAccessibleSibling()
Get the next sibling of this Accessible, if a preferred one exists.
 o getPreviousAccessibleSibling()
Get the previous sibling of this Accessible, if a preferred one exists.
 o getSize()
Returns the current size of this object
 o isEnabled()
Determine if the object is enabled.
 o isFocusTraversable()
Returns whether this object can accept focus or not.
 o isShowing()
Determine if the object is showing.
 o isVisible()
Determine if the object is visible.
 o removeAccessibleSelection(int)
Removes the nth selected item in the object from the object's selection.
 o removeFocusListener(FocusListener)
Removes the specified focus listener so it no longer receives focus events from this component.
 o requestFocus()
Requests focus for this object.
 o selectAllAccessibleSelection()
Causes every selected item in the object to be selected, if the object supports multiple selections (if getAccessibleStateSet returns a state that is MULTISELECTABLE).
 o setAccessibleDescription(String)
Set the accessible description of this object.
 o setAccessibleName(String)
Set the localized accessible name of this object.
 o setBackground(Color)
Set the background color of this object.
 o setBounds(Rectangle)
Sets the current bounds of this object
 o setCursor(Cursor)
Set the Cursor of this object.
 o setEnabled(boolean)
Set the enabled state of the object.
 o setFont(Font)
Set the Font of this object.
 o setForeground(Color)
Set the foreground color of this object.
 o setLocale(Locale)
Sets the locale of the component.
 o setLocation(Point)
Sets the location of the object relative to parent.
 o setSize(Dimension)
Sets the current size of this object
 o setVisible(boolean)
Set the visible state of the object.

Methods

 o getNextAccessibleSibling
 public abstract Accessible getNextAccessibleSibling()
Get the next sibling of this Accessible, if a preferred one exists.

Returns:
the next Accessible, if there is one
 o getPreviousAccessibleSibling
 public abstract Accessible getPreviousAccessibleSibling()
Get the previous sibling of this Accessible, if a preferred one exists.

Returns:
the previous Accessible, if there is one
 o getBackground
 public abstract Color getBackground()
Get the background color of this object.

Returns:
if supported, the background color of the object; otherwise, null
 o setBackground
 public abstract void setBackground(Color c)
Set the background color of this object.

Parameters:
c - the new Color for the background
 o getForeground
 public abstract Color getForeground()
Get the foreground color of this object.

Returns:
if supported, the foreground color of the object; otherwise, null
 o setForeground
 public abstract void setForeground(Color c)
Set the foreground color of this object.

Parameters:
c - the new Color for the foreground
 o getCursor
 public abstract Cursor getCursor()
Get the Cursor of this object.

Returns:
if supported, the Cursor of the object; otherwise, null
 o setCursor
 public abstract void setCursor(Cursor cursor)
Set the Cursor of this object.

Parameters:
c - the new Cursor for the object
 o getFont
 public abstract Font getFont()
Get the Font of this object.

Returns:
if supported, the Font for the object; otherwise, null
 o setFont
 public abstract void setFont(Font f)
Set the Font of this object.

Parameters:
f - the new Font for the object
 o getFontMetrics
 public abstract FontMetrics getFontMetrics(Font f)
Get the FontMetrics of this object.

Parameters:
f - the Font
Returns:
if supported, the FontMetrics the object; otherwise, null
See Also:
getFont
 o isEnabled
 public abstract boolean isEnabled()
Determine if the object is enabled.

Returns:
true if object is enabled; otherwise, false
 o setEnabled
 public abstract void setEnabled(boolean b)
Set the enabled state of the object.

Parameters:
b - if true, enables this object; otherwise, disables it
 o isVisible
 public abstract boolean isVisible()
Determine if the object is visible. Note: this means that the object intends to be visible; however, it may not in fact be showing on the screen, because one of the objects that this object is contained by is not visible. To determine if an object is showing on the screen, use isShowing().

Returns:
true if object is visible; otherwise, false
 o setVisible
 public abstract void setVisible(boolean b)
Set the visible state of the object.

Parameters:
b - if true, shows this object; otherwise, hides it
 o isShowing
 public abstract boolean isShowing()
Determine if the object is showing. This is determined by checking the visibility of the object and ancestors of the object. Note: this will return true even if the object is obscured by another (for example, it happens to be underneath a menu that was pulled down).

Returns:
true if object is showing; otherwise, false
 o contains
 public abstract boolean contains(Point p)
Checks whether the specified Point is within this object's bounds, where the Point is relative to the coordinate system of the object.

Parameters:
p - the Point relative to the coordinate system of the object
Returns:
true if object contains Point; otherwise false
 o getLocationOnScreen
 public abstract Point getLocationOnScreen()
Returns the location of the object on the screen.

Returns:
location of object on screen -- can be null if this object is not on the screen
 o getLocation
 public abstract Point getLocation()
Returns the location of the object relative to parent.

Returns:
location of object relative to parent -- can be null if this object or its parent are not on the screen
 o setLocation
 public abstract void setLocation(Point p)
Sets the location of the object relative to parent.

 o getBounds
 public abstract Rectangle getBounds()
Returns the current bounds of this object

Returns:
current bounds of object -- can be null if this object is not on the screen
 o setBounds
 public abstract void setBounds(Rectangle r)
Sets the current bounds of this object

 o getSize
 public abstract Dimension getSize()
Returns the current size of this object

Returns:
current size of object -- can be null if this object is not on the screen
 o setSize
 public abstract void setSize(Dimension d)
Sets the current size of this object

 o getAccessibleAt
 public abstract Accessible getAccessibleAt(Point p)
Returns the Accessible child contained at the local coordinate Point, if one exists.

Returns:
the Accessible at the specified location, if it exists
 o isFocusTraversable
 public abstract boolean isFocusTraversable()
Returns whether this object can accept focus or not.

Returns:
true if object can accept focus; otherwise false
 o requestFocus
 public abstract void requestFocus()
Requests focus for this object.

 o getAccessibleName
 public abstract String getAccessibleName()
Get the accessible name of this object.

Returns:
the localized name of the object -- can be null if this object does not have a name
 o setAccessibleName
 public abstract void setAccessibleName(String s)
Set the localized accessible name of this object.

Parameters:
s - the new localized name of the object.
 o getAccessibleDescription
 public abstract String getAccessibleDescription()
Get the accessible description of this object.

Returns:
the localized description of the object -- can be null if this object does not have a description
 o setAccessibleDescription
 public abstract void setAccessibleDescription(String s)
Set the accessible description of this object.

Parameters:
s - the new localized description of the object
 o getAccessibleStateSet
 public abstract AccessibleStateSet getAccessibleStateSet()
Get the state set of this object.

Returns:
an instance of AccessibleStateSet containing the current state set of the object
See Also:
AccessibleState
 o getAccessibleRole
 public abstract AccessibleRole getAccessibleRole()
Get the role of this object.

Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole
 o getAccessibleValue
 public abstract String getAccessibleValue()
Get the value of this object as a String.

Returns:
human readable value of the object -- can be null if this object does not have a value
 o getAccessibleParent
 public abstract Accessible getAccessibleParent()
Get the Accessible parent of this object.

Returns:
the Accessible parent of this object -- can be null if this object does not have an Accessible parent
 o getAccessibleChildrenCount
 public abstract int getAccessibleChildrenCount()
Returns the number of accessible children in the object.

Returns:
the number of accessible children in the object.
 o getAccessibleChild
 public abstract Accessible getAccessibleChild(int i)
Return the nth Accessible child of the object.

Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
 o getAccessibleActionCount
 public abstract int getAccessibleActionCount()
Returns the number of items Actions available in this object If there is more than one, the first one is the "default" action (if any action is considered "default").

Returns:
the number of Actions in this object
 o getAccessibleActionDescription
 public abstract String getAccessibleActionDescription(int i)
Return a description of the nth action of the object.

Parameters:
i - zero-based index of the actions
Returns:
a description of the nth action
 o doAccessibleAction
 public abstract boolean doAccessibleAction(int i)
Perform the nth Action on the object

Parameters:
i - zero-based index of actions
Returns:
whether the action was performed or not.
 o getLocale
 public abstract Locale getLocale() throws IllegalComponentStateException
Gets the locale of the component. If the component does not have a locale, the locale of its parent is returned.

Returns:
the Locale of the object.
See Also:
setLocale
 o setLocale
 public abstract void setLocale(Locale l)
Sets the locale of the component.

Parameters:
l - the new Locale of the object.
See Also:
getLocale
 o getAccessibleText
 public abstract AccessibleText getAccessibleText()
Gets the AccessibleText interface for the component. If the component does not speak AccessibleText, or have a proxy which does, this method returns null.

Returns:
the AccessibleText of the object.
See Also:
AccessibleText
 o addFocusListener
 public abstract void addFocusListener(FocusListener l)
Adds the specified focus listener to receive focus events from this component.

Parameters:
l - the focus listener
 o removeFocusListener
 public abstract void removeFocusListener(FocusListener l)
Removes the specified focus listener so it no longer receives focus events from this component.

Parameters:
l - the focus listener
 o getAccessibleSelectionCount
 public abstract int getAccessibleSelectionCount()
Returns the number of items currently selected. If no items are selected, the return value will be 0.

Returns:
the number of items currently selected.
 o getAccessibleSelection
 public abstract Accessible getAccessibleSelection(int i)
Returns an Accessible representing the nth selected item in the object. If there isn't a selection, or there are fewer items selcted than the integer passed in, the return value will be null.

Parameters:
i - the zero-based index of selected items
Returns:
an Accessible containing the selected item
 o addAccessibleSelection
 public abstract void addAccessibleSelection(int i)
Adds the nth selected item in the object to the object's selection. If the object supports multiple selections, (the method getAccessibleStateSet returns a state that is MULTISELECTABLE) the nth item is added to any existing selection, otherwse it replaces any existing selection in the objct. If the nth item is already selected, this method has no effect.

Parameters:
i - the zero-based index of selectable items
See Also:
getAccessibleStateSet
 o removeAccessibleSelection
 public abstract void removeAccessibleSelection(int i)
Removes the nth selected item in the object from the object's selection. If the nth item isn't currently selected, this method has no effect.

Parameters:
i - the zero-based index of selectable items
 o clearAccessibleSelection
 public abstract void clearAccessibleSelection()
Clears the selection in the object, so that nothing in the object is selected.

 o selectAllAccessibleSelection
 public abstract void selectAllAccessibleSelection()
Causes every selected item in the object to be selected, if the object supports multiple selections (if getAccessibleStateSet returns a state that is MULTISELECTABLE).

See Also:
getAccessibleStateSet

All Packages  Class Hierarchy  This Package  Previous  Next  Index