Top Description Inners Fields Constructors Methods
org.eclipse.swt.accessibility

public Class Accessible

extends Object
Class Inheritance
Imports
java.util.*, .List, org.eclipse.swt.*, org.eclipse.swt.internal.gtk.*, org.eclipse.swt.internal.gtk3.*, org.eclipse.swt.internal.gtk4.*, org.eclipse.swt.widgets.*

Instances of this class provide a bridge between application code and assistive technology clients. Many platforms provide default accessible behavior for most widgets, and this class allows that default behavior to be overridden. Applications can get the default Accessible object for a control by sending it getAccessible, and then add an accessible listener to override simple items like the name and help string, or they can add an accessible control listener to override complex items. As a rule of thumb, an application would only want to use the accessible control listener to implement accessibility for a custom control.
Since
2.0
See Also
Control#getAccessible, AccessibleListener, AccessibleEvent, AccessibleControlListener, AccessibleControlEvent, Accessibility snippets, Sample code and further information

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv List<AccessibleActionListener>
pack-priv List<AccessibleAttributeListener>
pack-priv List<AccessibleControlListener>
pack-priv List<AccessibleEditableTextListener>
pack-priv List<AccessibleHyperlinkListener>
pack-priv List<AccessibleListener>
pack-priv AccessibleObject
pack-priv List<AccessibleTableCellListener>
pack-priv List<AccessibleTableListener>
pack-priv List<AccessibleTextExtendedListener>
pack-priv List<AccessibleTextListener>
pack-priv List<AccessibleValueListener>
pack-priv List<Accessible>
pack-priv Control
pack-priv Accessible
pack-priv List<Accessible.Relation>

Constructor Summary

AccessConstructor and Description
public
Accessible(Accessible
the Accessible parent, which must not be null
parent
)

Constructs a new instance of this class given its parent.

protected
Accessible()

Deprecated
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
addAccessibleActionListener(AccessibleActionListener
the listener that should be notified when the receiver is asked for AccessibleActionListener interface properties
listener
)

Adds the listener to the collection of listeners that will be notified when an accessible client asks for any of the properties defined in the AccessibleActionListener interface.

public void
addAccessibleAttributeListener(AccessibleAttributeListener
the listener that should be notified when the receiver is asked for AccessibleAttributeListener interface properties
listener
)

Adds the listener to the collection of listeners that will be notified when an accessible client asks for any of the properties defined in the AccessibleAttributeListener interface.

public void
addAccessibleControlListener(AccessibleControlListener
the listener that should be notified when the receiver is asked for custom control specific information
listener
)

Adds the listener to the collection of listeners who will be notified when an accessible client asks for custom control specific information.

public void
addAccessibleEditableTextListener(AccessibleEditableTextListener
the listener that should be notified when the receiver is asked for AccessibleEditableTextListener interface properties
listener
)

Adds the listener to the collection of listeners that will be notified when an accessible client asks for any of the properties defined in the AccessibleEditableTextListener interface.

public void
addAccessibleHyperlinkListener(AccessibleHyperlinkListener
the listener that should be notified when the receiver is asked for AccessibleHyperlinkListener interface properties
listener
)

Adds the listener to the collection of listeners that will be notified when an accessible client asks for any of the properties defined in the AccessibleHyperlinkListener interface.

public void
addAccessibleListener(AccessibleListener
the listener that should be notified when the receiver is asked for a name, description, help, or keyboard shortcut string
listener
)

Adds the listener to the collection of listeners who will be notified when an accessible client asks for certain strings, such as name, description, help, or keyboard shortcut.

public void
addAccessibleTableCellListener(AccessibleTableCellListener
the listener that should be notified when the receiver is asked for AccessibleTableCellListener interface properties
listener
)

Adds the listener to the collection of listeners that will be notified when an accessible client asks for any of the properties defined in the AccessibleTableCellListener interface.

public void
addAccessibleTableListener(AccessibleTableListener
the listener that should be notified when the receiver is asked for AccessibleTableListener interface properties
listener
)

Adds the listener to the collection of listeners that will be notified when an accessible client asks for any of the properties defined in the AccessibleTableListener interface.

public void
addAccessibleTextListener(AccessibleTextListener
the listener that should be notified when the receiver is asked for custom text control specific information
listener
)

Adds the listener to the collection of listeners who will be notified when an accessible client asks for custom text control specific information.

public void
addAccessibleValueListener(AccessibleValueListener
the listener that should be notified when the receiver is asked for AccessibleValueListener interface properties
listener
)

Adds the listener to the collection of listeners that will be notified when an accessible client asks for any of the properties defined in the AccessibleValueListener interface.

public void
addRelation(int
an ACC constant beginning with RELATION_* indicating the type of relation
type
,
Accessible
the accessible that is the target for this relation
target
)

Adds a relation with the specified type and target to the receiver's set of relations.

pack-priv void
pack-priv static Accessible
pack-priv void
public void
dispose()

Disposes of the operating system resources associated with the receiver, and removes the receiver from its parent's list of children.

pack-priv AccessibleObject
public Control

Returns:

the receiver's control
getControl
()

Returns the control for this Accessible object.

pack-priv long
public void
internal_dispose_Accessible()

Invokes platform specific functionality to dispose an accessible object.

public static Accessible

Returns:

the platform specific accessible object
internal_new_Accessible
(Control
the control to get the accessible object for
control
)

Invokes platform specific functionality to allocate a new accessible object.

pack-priv boolean
pack-priv void
public void
removeAccessibleActionListener(AccessibleActionListener
the listener that should no longer be notified when the receiver is asked for AccessibleActionListener interface properties
listener
)

Removes the listener from the collection of listeners that will be notified when an accessible client asks for any of the properties defined in the AccessibleActionListener interface.

public void
removeAccessibleAttributeListener(AccessibleAttributeListener
the listener that should no longer be notified when the receiver is asked for AccessibleAttributeListener interface properties
listener
)

Removes the listener from the collection of listeners that will be notified when an accessible client asks for any of the properties defined in the AccessibleAttributeListener interface.

public void
removeAccessibleControlListener(AccessibleControlListener
the listener that should no longer be notified when the receiver is asked for custom control specific information
listener
)

Removes the listener from the collection of listeners who will be notified when an accessible client asks for custom control specific information.

public void
removeAccessibleEditableTextListener(AccessibleEditableTextListener
the listener that should no longer be notified when the receiver is asked for AccessibleEditableTextListener interface properties
listener
)

Removes the listener from the collection of listeners that will be notified when an accessible client asks for any of the properties defined in the AccessibleEditableTextListener interface.

public void
removeAccessibleHyperlinkListener(AccessibleHyperlinkListener
the listener that should no longer be notified when the receiver is asked for AccessibleHyperlinkListener interface properties
listener
)

Removes the listener from the collection of listeners that will be notified when an accessible client asks for any of the properties defined in the AccessibleHyperlinkListener interface.

public void
removeAccessibleListener(AccessibleListener
the listener that should no longer be notified when the receiver is asked for a name, description, help, or keyboard shortcut string
listener
)

Removes the listener from the collection of listeners who will be notified when an accessible client asks for certain strings, such as name, description, help, or keyboard shortcut.

public void
removeAccessibleTableCellListener(AccessibleTableCellListener
the listener that should no longer be notified when the receiver is asked for AccessibleTableCellListener interface properties
listener
)

Removes the listener from the collection of listeners that will be notified when an accessible client asks for any of the properties defined in the AccessibleTableCellListener interface.

public void
removeAccessibleTableListener(AccessibleTableListener
the listener that should no longer be notified when the receiver is asked for AccessibleTableListener interface properties
listener
)

Removes the listener from the collection of listeners that will be notified when an accessible client asks for any of the properties defined in the AccessibleTableListener interface.

public void
removeAccessibleTextListener(AccessibleTextListener
the listener that should no longer be notified when the receiver is asked for custom text control specific information
listener
)

Removes the listener from the collection of listeners who will be notified when an accessible client asks for custom text control specific information.

public void
removeAccessibleValueListener(AccessibleValueListener
the listener that should no longer be notified when the receiver is asked for AccessibleValueListener interface properties
listener
)

Removes the listener from the collection of listeners that will be notified when an accessible client asks for any of the properties defined in the AccessibleValueListener interface.

public void
removeRelation(int
an ACC constant beginning with RELATION_* indicating the type of relation
type
,
Accessible
the accessible that is the target for this relation
target
)

Removes the relation with the specified type and target from the receiver's set of relations.

public void
selectionChanged()

Sends a message to accessible clients that the child selection within a custom container control has changed.

public void
sendEvent(int
an ACC constant beginning with EVENT_* indicating the message to send
event
,
Object
an object containing event-specific data, or null if there is no event-specific data (eventData is specified in the documentation for individual ACC.EVENT_* constants)
eventData
)

Sends a message with event-specific data to accessible clients indicating that something has changed within a custom control.

public void
sendEvent(int
an ACC constant beginning with EVENT_* indicating the message to send
event
,
Object
an object containing event-specific data, or null if there is no event-specific data (eventData is specified in the documentation for individual ACC.EVENT_* constants)
eventData
,
int
an identifier specifying a child of the control
childID
)

Sends a message with event-specific data and a childID to accessible clients, indicating that something has changed within a custom control.

public void
setFocus(int
an identifier specifying a child of the control
childID
)

Sends a message to accessible clients indicating that the focus has changed within a custom control.

public void
textCaretMoved(int
the new caret index within the control
index
)

Sends a message to accessible clients that the text caret has moved within a custom control.

public void
textChanged(int
the type of change, one of ACC.TEXT_INSERT or ACC.TEXT_DELETE
type
,
int
the text index within the control where the insertion or deletion begins
startIndex
,
int
the non-negative length in characters of the insertion or deletion
length
)

Sends a message to accessible clients that the text within a custom control has changed.

public void
textSelectionChanged()

Sends a message to accessible clients that the text selection has changed within a custom control.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

accessibleActionListenersback to summary
pack-priv List<AccessibleActionListener> accessibleActionListeners
accessibleAttributeListenersback to summary
pack-priv List<AccessibleAttributeListener> accessibleAttributeListeners
accessibleControlListenersback to summary
pack-priv List<AccessibleControlListener> accessibleControlListeners
accessibleEditableTextListenersback to summary
pack-priv List<AccessibleEditableTextListener> accessibleEditableTextListeners
accessibleHyperlinkListenersback to summary
pack-priv List<AccessibleHyperlinkListener> accessibleHyperlinkListeners
accessibleListenersback to summary
pack-priv List<AccessibleListener> accessibleListeners
accessibleObjectback to summary
pack-priv AccessibleObject accessibleObject
accessibleTableCellListenersback to summary
pack-priv List<AccessibleTableCellListener> accessibleTableCellListeners
accessibleTableListenersback to summary
pack-priv List<AccessibleTableListener> accessibleTableListeners
accessibleTextExtendedListenersback to summary
pack-priv List<AccessibleTextExtendedListener> accessibleTextExtendedListeners
accessibleTextListenersback to summary
pack-priv List<AccessibleTextListener> accessibleTextListeners
accessibleValueListenersback to summary
pack-priv List<AccessibleValueListener> accessibleValueListeners
childrenback to summary
pack-priv List<Accessible> children
controlback to summary
pack-priv Control control
parentback to summary
pack-priv Accessible parent
relationsback to summary
pack-priv List<Accessible.Relation> relations

Constructor Detail

Accessibleback to summary
public Accessible(Accessible parent)

Constructs a new instance of this class given its parent.

Parameters
parent:Accessible

the Accessible parent, which must not be null

Exceptions
IllegalArgumentException:
  • ERROR_NULL_ARGUMENT - if the parent is null
Since
3.6
See Also
dispose, Control#getAccessible
Accessibleback to summary
protected Accessible()

Deprecated

Annotations
@Deprecated
Since
3.5
Accessibleback to summary
pack-priv Accessible(Control control)

Method Detail

addAccessibleActionListenerback to summary
public void addAccessibleActionListener(AccessibleActionListener listener)

Adds the listener to the collection of listeners that will be notified when an accessible client asks for any of the properties defined in the AccessibleActionListener interface.

Parameters
listener:AccessibleActionListener

the listener that should be notified when the receiver is asked for AccessibleActionListener interface properties

Exceptions
IllegalArgumentException:
  • ERROR_NULL_ARGUMENT - if the listener is null
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control
Since
3.6
See Also
AccessibleActionListener, removeAccessibleActionListener
addAccessibleAttributeListenerback to summary
public void addAccessibleAttributeListener(AccessibleAttributeListener listener)

Adds the listener to the collection of listeners that will be notified when an accessible client asks for any of the properties defined in the AccessibleAttributeListener interface.

Parameters
listener:AccessibleAttributeListener

the listener that should be notified when the receiver is asked for AccessibleAttributeListener interface properties

Exceptions
IllegalArgumentException:
  • ERROR_NULL_ARGUMENT - if the listener is null
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control
Since
3.6
See Also
AccessibleAttributeListener, removeAccessibleAttributeListener
addAccessibleControlListenerback to summary
public void addAccessibleControlListener(AccessibleControlListener listener)

Adds the listener to the collection of listeners who will be notified when an accessible client asks for custom control specific information. The listener is notified by sending it one of the messages defined in the AccessibleControlListener interface.

Parameters
listener:AccessibleControlListener

the listener that should be notified when the receiver is asked for custom control specific information

Exceptions
IllegalArgumentException:
  • ERROR_NULL_ARGUMENT - if the listener is null
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control
See Also
AccessibleControlListener, removeAccessibleControlListener
addAccessibleEditableTextListenerback to summary
public void addAccessibleEditableTextListener(AccessibleEditableTextListener listener)

Adds the listener to the collection of listeners that will be notified when an accessible client asks for any of the properties defined in the AccessibleEditableTextListener interface.

Parameters
listener:AccessibleEditableTextListener

the listener that should be notified when the receiver is asked for AccessibleEditableTextListener interface properties

Exceptions
IllegalArgumentException:
  • ERROR_NULL_ARGUMENT - if the listener is null
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control
Since
3.7
See Also
AccessibleEditableTextListener, removeAccessibleEditableTextListener
addAccessibleHyperlinkListenerback to summary
public void addAccessibleHyperlinkListener(AccessibleHyperlinkListener listener)

Adds the listener to the collection of listeners that will be notified when an accessible client asks for any of the properties defined in the AccessibleHyperlinkListener interface.

Parameters
listener:AccessibleHyperlinkListener

the listener that should be notified when the receiver is asked for AccessibleHyperlinkListener interface properties

Exceptions
IllegalArgumentException:
  • ERROR_NULL_ARGUMENT - if the listener is null
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control
Since
3.6
See Also
AccessibleHyperlinkListener, removeAccessibleHyperlinkListener
addAccessibleListenerback to summary
public void addAccessibleListener(AccessibleListener listener)

Adds the listener to the collection of listeners who will be notified when an accessible client asks for certain strings, such as name, description, help, or keyboard shortcut. The listener is notified by sending it one of the messages defined in the AccessibleListener interface.

Parameters
listener:AccessibleListener

the listener that should be notified when the receiver is asked for a name, description, help, or keyboard shortcut string

Exceptions
IllegalArgumentException:
  • ERROR_NULL_ARGUMENT - if the listener is null
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control
See Also
AccessibleListener, removeAccessibleListener
addAccessibleTableCellListenerback to summary
public void addAccessibleTableCellListener(AccessibleTableCellListener listener)

Adds the listener to the collection of listeners that will be notified when an accessible client asks for any of the properties defined in the AccessibleTableCellListener interface.

Parameters
listener:AccessibleTableCellListener

the listener that should be notified when the receiver is asked for AccessibleTableCellListener interface properties

Exceptions
IllegalArgumentException:
  • ERROR_NULL_ARGUMENT - if the listener is null
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control
Since
3.6
See Also
AccessibleTableCellListener, removeAccessibleTableCellListener
addAccessibleTableListenerback to summary
public void addAccessibleTableListener(AccessibleTableListener listener)

Adds the listener to the collection of listeners that will be notified when an accessible client asks for any of the properties defined in the AccessibleTableListener interface.

Parameters
listener:AccessibleTableListener

the listener that should be notified when the receiver is asked for AccessibleTableListener interface properties

Exceptions
IllegalArgumentException:
  • ERROR_NULL_ARGUMENT - if the listener is null
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control
Since
3.6
See Also
AccessibleTableListener, removeAccessibleTableListener
addAccessibleTextListenerback to summary
public void addAccessibleTextListener(AccessibleTextListener listener)

Adds the listener to the collection of listeners who will be notified when an accessible client asks for custom text control specific information. The listener is notified by sending it one of the messages defined in the AccessibleTextListener and AccessibleTextExtendedListener interfaces.

Parameters
listener:AccessibleTextListener

the listener that should be notified when the receiver is asked for custom text control specific information

Exceptions
IllegalArgumentException:
  • ERROR_NULL_ARGUMENT - if the listener is null
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control
Since
3.0
See Also
AccessibleTextListener, AccessibleTextExtendedListener, removeAccessibleTextListener
addAccessibleValueListenerback to summary
public void addAccessibleValueListener(AccessibleValueListener listener)

Adds the listener to the collection of listeners that will be notified when an accessible client asks for any of the properties defined in the AccessibleValueListener interface.

Parameters
listener:AccessibleValueListener

the listener that should be notified when the receiver is asked for AccessibleValueListener interface properties

Exceptions
IllegalArgumentException:
  • ERROR_NULL_ARGUMENT - if the listener is null
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control
Since
3.6
See Also
AccessibleValueListener, removeAccessibleValueListener
addRelationback to summary
public void addRelation(int type, Accessible target)

Adds a relation with the specified type and target to the receiver's set of relations.

Parameters
type:int

an ACC constant beginning with RELATION_* indicating the type of relation

target:Accessible

the accessible that is the target for this relation

Exceptions
IllegalArgumentException:
ERROR_NULL_ARGUMENT - if the Accessible target is null
Since
3.6
addRelationsback to summary
pack-priv void addRelations()
checkNullback to summary
pack-priv static Accessible checkNull(Accessible parent)
checkWidgetback to summary
pack-priv void checkWidget()
disposeback to summary
public void dispose()

Disposes of the operating system resources associated with the receiver, and removes the receiver from its parent's list of children.

This method should be called when an accessible that was created with the public constructor Accessible(Accessible parent) is no longer needed. You do not need to call this when the receiver's control is disposed, because all Accessible instances associated with a control are released when the control is disposed. It is also not necessary to call this for instances of Accessible that were retrieved with Control.getAccessible().

Since
3.6
getAccessibleObjectback to summary
pack-priv AccessibleObject getAccessibleObject()
getControlback to summary
public Control getControl()

Returns the control for this Accessible object.

Returns:Control

the receiver's control

Since
3.0
getControlHandleback to summary
pack-priv long getControlHandle()
internal_dispose_Accessibleback to summary
public void internal_dispose_Accessible()

Invokes platform specific functionality to dispose an accessible object.

Important Note

This method is not part of the public API for Accessible. It is marked public only so that it can be shared within the packages provided by SWT. It is not available on all platforms, and should never be called from application code.

internal_new_Accessibleback to summary
public static Accessible internal_new_Accessible(Control control)

Invokes platform specific functionality to allocate a new accessible object.

Important Note

This method is not part of the public API for Accessible. It is marked public only so that it can be shared within the packages provided by SWT. It is not available on all platforms, and should never be called from application code.

Parameters
control:Control

the control to get the accessible object for

Returns:Accessible

the platform specific accessible object

isValidThreadback to summary
pack-priv boolean isValidThread()
releaseback to summary
pack-priv void release()
removeAccessibleActionListenerback to summary
public void removeAccessibleActionListener(AccessibleActionListener listener)

Removes the listener from the collection of listeners that will be notified when an accessible client asks for any of the properties defined in the AccessibleActionListener interface.

Parameters
listener:AccessibleActionListener

the listener that should no longer be notified when the receiver is asked for AccessibleActionListener interface properties

Exceptions
IllegalArgumentException:
  • ERROR_NULL_ARGUMENT - if the listener is null
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control
Since
3.6
See Also
AccessibleActionListener, addAccessibleActionListener
removeAccessibleAttributeListenerback to summary
public void removeAccessibleAttributeListener(AccessibleAttributeListener listener)

Removes the listener from the collection of listeners that will be notified when an accessible client asks for any of the properties defined in the AccessibleAttributeListener interface.

Parameters
listener:AccessibleAttributeListener

the listener that should no longer be notified when the receiver is asked for AccessibleAttributeListener interface properties

Exceptions
IllegalArgumentException:
  • ERROR_NULL_ARGUMENT - if the listener is null
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control
Since
3.6
See Also
AccessibleAttributeListener, addAccessibleAttributeListener
removeAccessibleControlListenerback to summary
public void removeAccessibleControlListener(AccessibleControlListener listener)

Removes the listener from the collection of listeners who will be notified when an accessible client asks for custom control specific information.

Parameters
listener:AccessibleControlListener

the listener that should no longer be notified when the receiver is asked for custom control specific information

Exceptions
IllegalArgumentException:
  • ERROR_NULL_ARGUMENT - if the listener is null
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control
See Also
AccessibleControlListener, addAccessibleControlListener
removeAccessibleEditableTextListenerback to summary
public void removeAccessibleEditableTextListener(AccessibleEditableTextListener listener)

Removes the listener from the collection of listeners that will be notified when an accessible client asks for any of the properties defined in the AccessibleEditableTextListener interface.

Parameters
listener:AccessibleEditableTextListener

the listener that should no longer be notified when the receiver is asked for AccessibleEditableTextListener interface properties

Exceptions
IllegalArgumentException:
  • ERROR_NULL_ARGUMENT - if the listener is null
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control
Since
3.7
See Also
AccessibleEditableTextListener, addAccessibleEditableTextListener
removeAccessibleHyperlinkListenerback to summary
public void removeAccessibleHyperlinkListener(AccessibleHyperlinkListener listener)

Removes the listener from the collection of listeners that will be notified when an accessible client asks for any of the properties defined in the AccessibleHyperlinkListener interface.

Parameters
listener:AccessibleHyperlinkListener

the listener that should no longer be notified when the receiver is asked for AccessibleHyperlinkListener interface properties

Exceptions
IllegalArgumentException:
  • ERROR_NULL_ARGUMENT - if the listener is null
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control
Since
3.6
See Also
AccessibleHyperlinkListener, addAccessibleHyperlinkListener
removeAccessibleListenerback to summary
public void removeAccessibleListener(AccessibleListener listener)

Removes the listener from the collection of listeners who will be notified when an accessible client asks for certain strings, such as name, description, help, or keyboard shortcut.

Parameters
listener:AccessibleListener

the listener that should no longer be notified when the receiver is asked for a name, description, help, or keyboard shortcut string

Exceptions
IllegalArgumentException:
  • ERROR_NULL_ARGUMENT - if the listener is null
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control
See Also
AccessibleListener, addAccessibleListener
removeAccessibleTableCellListenerback to summary
public void removeAccessibleTableCellListener(AccessibleTableCellListener listener)

Removes the listener from the collection of listeners that will be notified when an accessible client asks for any of the properties defined in the AccessibleTableCellListener interface.

Parameters
listener:AccessibleTableCellListener

the listener that should no longer be notified when the receiver is asked for AccessibleTableCellListener interface properties

Exceptions
IllegalArgumentException:
  • ERROR_NULL_ARGUMENT - if the listener is null
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control
Since
3.6
See Also
AccessibleTableCellListener, addAccessibleTableCellListener
removeAccessibleTableListenerback to summary
public void removeAccessibleTableListener(AccessibleTableListener listener)

Removes the listener from the collection of listeners that will be notified when an accessible client asks for any of the properties defined in the AccessibleTableListener interface.

Parameters
listener:AccessibleTableListener

the listener that should no longer be notified when the receiver is asked for AccessibleTableListener interface properties

Exceptions
IllegalArgumentException:
  • ERROR_NULL_ARGUMENT - if the listener is null
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control
Since
3.6
See Also
AccessibleTableListener, addAccessibleTableListener
removeAccessibleTextListenerback to summary
public void removeAccessibleTextListener(AccessibleTextListener listener)

Removes the listener from the collection of listeners who will be notified when an accessible client asks for custom text control specific information.

Parameters
listener:AccessibleTextListener

the listener that should no longer be notified when the receiver is asked for custom text control specific information

Exceptions
IllegalArgumentException:
  • ERROR_NULL_ARGUMENT - if the listener is null
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control
Since
3.0
See Also
AccessibleTextListener, AccessibleTextExtendedListener, addAccessibleTextListener
removeAccessibleValueListenerback to summary
public void removeAccessibleValueListener(AccessibleValueListener listener)

Removes the listener from the collection of listeners that will be notified when an accessible client asks for any of the properties defined in the AccessibleValueListener interface.

Parameters
listener:AccessibleValueListener

the listener that should no longer be notified when the receiver is asked for AccessibleValueListener interface properties

Exceptions
IllegalArgumentException:
  • ERROR_NULL_ARGUMENT - if the listener is null
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control
Since
3.6
See Also
AccessibleValueListener, addAccessibleValueListener
removeRelationback to summary
public void removeRelation(int type, Accessible target)

Removes the relation with the specified type and target from the receiver's set of relations.

Parameters
type:int

an ACC constant beginning with RELATION_* indicating the type of relation

target:Accessible

the accessible that is the target for this relation

Exceptions
IllegalArgumentException:
ERROR_NULL_ARGUMENT - if the Accessible target is null
Since
3.6
selectionChangedback to summary
public void selectionChanged()

Sends a message to accessible clients that the child selection within a custom container control has changed.

Exceptions
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control
Since
3.0
sendEventback to summary
public void sendEvent(int event, Object eventData)

Sends a message with event-specific data to accessible clients indicating that something has changed within a custom control.

Parameters
event:int

an ACC constant beginning with EVENT_* indicating the message to send

eventData:Object

an object containing event-specific data, or null if there is no event-specific data (eventData is specified in the documentation for individual ACC.EVENT_* constants)

Exceptions
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control
Since
3.6
See Also
ACC#EVENT_ACTION_CHANGED, ACC#EVENT_ATTRIBUTE_CHANGED, ACC#EVENT_DESCRIPTION_CHANGED, ACC#EVENT_DOCUMENT_LOAD_COMPLETE, ACC#EVENT_DOCUMENT_LOAD_STOPPED, ACC#EVENT_DOCUMENT_RELOAD, ACC#EVENT_HYPERLINK_ACTIVATED, ACC#EVENT_HYPERLINK_ANCHOR_COUNT_CHANGED, ACC#EVENT_HYPERLINK_END_INDEX_CHANGED, ACC#EVENT_HYPERLINK_SELECTED_LINK_CHANGED, ACC#EVENT_HYPERLINK_START_INDEX_CHANGED, ACC#EVENT_HYPERTEXT_LINK_COUNT_CHANGED, ACC#EVENT_HYPERTEXT_LINK_SELECTED, ACC#EVENT_LOCATION_CHANGED, ACC#EVENT_NAME_CHANGED, ACC#EVENT_PAGE_CHANGED, ACC#EVENT_SECTION_CHANGED, ACC#EVENT_SELECTION_CHANGED, ACC#EVENT_STATE_CHANGED, ACC#EVENT_TABLE_CAPTION_CHANGED, ACC#EVENT_TABLE_CHANGED, ACC#EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED, ACC#EVENT_TABLE_COLUMN_HEADER_CHANGED, ACC#EVENT_TABLE_ROW_DESCRIPTION_CHANGED, ACC#EVENT_TABLE_ROW_HEADER_CHANGED, ACC#EVENT_TABLE_SUMMARY_CHANGED, ACC#EVENT_TEXT_ATTRIBUTE_CHANGED, ACC#EVENT_TEXT_CARET_MOVED, ACC#EVENT_TEXT_CHANGED, ACC#EVENT_TEXT_COLUMN_CHANGED, ACC#EVENT_TEXT_SELECTION_CHANGED, ACC#EVENT_VALUE_CHANGED
sendEventback to summary
public void sendEvent(int event, Object eventData, int childID)

Sends a message with event-specific data and a childID to accessible clients, indicating that something has changed within a custom control.

Note

This API is intended for applications that are still using childIDs. Moving forward, applications should use accessible objects instead of childIDs.

Parameters
event:int

an ACC constant beginning with EVENT_* indicating the message to send

eventData:Object

an object containing event-specific data, or null if there is no event-specific data (eventData is specified in the documentation for individual ACC.EVENT_* constants)

childID:int

an identifier specifying a child of the control

Exceptions
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control
Since
3.8
See Also
ACC#EVENT_DESCRIPTION_CHANGED, ACC#EVENT_LOCATION_CHANGED, ACC#EVENT_NAME_CHANGED, ACC#EVENT_SELECTION_CHANGED, ACC#EVENT_STATE_CHANGED, ACC#EVENT_TEXT_SELECTION_CHANGED, ACC#EVENT_VALUE_CHANGED
setFocusback to summary
public void setFocus(int childID)

Sends a message to accessible clients indicating that the focus has changed within a custom control.

Parameters
childID:int

an identifier specifying a child of the control

Exceptions
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control
textCaretMovedback to summary
public void textCaretMoved(int index)

Sends a message to accessible clients that the text caret has moved within a custom control.

Parameters
index:int

the new caret index within the control

Exceptions
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control
Since
3.0
textChangedback to summary
public void textChanged(int type, int startIndex, int length)

Sends a message to accessible clients that the text within a custom control has changed.

Parameters
type:int

the type of change, one of ACC.TEXT_INSERT or ACC.TEXT_DELETE

startIndex:int

the text index within the control where the insertion or deletion begins

length:int

the non-negative length in characters of the insertion or deletion

Exceptions
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control
Since
3.0
See Also
ACC#TEXT_INSERT, ACC#TEXT_DELETE
textSelectionChangedback to summary
public void textSelectionChanged()

Sends a message to accessible clients that the text selection has changed within a custom control.

Exceptions
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control
Since
3.0
org.eclipse.swt.accessibility back to summary

pack-priv Class Accessible.Relation

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv Accessible
pack-priv int

Constructor Summary

AccessConstructor and Description
public
Relation(int type, Accessible target)

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object
the reference object with which to compare.
object
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.
Inherited from java.lang.Object:
clonefinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

targetback to summary
pack-priv Accessible target
typeback to summary
pack-priv int type

Constructor Detail

Relationback to summary
public Relation(int type, Accessible target)

Method Detail

equalsback to summary
public boolean equals(Object object)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
object:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override