Difference between revisions of "Documentation/DevGuide/Accessibility/Listeners and Broadcasters"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (FINAL VERSION FOR L10N)
m (Correcting Wiki syntax error + number of cells in a sheet)
Line 17: Line 17:
 
Events are sent after the respective change of an accessible object took place. This enables the listener to retrieve up-to-date values that are sent with the event.
 
Events are sent after the respective change of an accessible object took place. This enables the listener to retrieve up-to-date values that are sent with the event.
  
{{Documentation/Note|A problem arises when the number of children becomes very large, as with Calc tables where the number of cells is <nowiki>256??32000=8192000</nowiki>. Registering at every cell certainly is not an option. The solution to this problem is the introduction of the <idlml>com.sun.star.accessibility.AccessibleStateType:TRANSIENT</idlml> state, which tells an AT not to register but to expect <idlml>com.sun.star.accessibility.AccessibleEventId:ACTIVE_DESCENDANT_CHANGED</idlml> events sent from their parent. To prevent the AT from having to ask every child whether it is transient, the parent must set the <idlml>com.sun.star.accessibility.AccessibleStateType:MANAGES_DESCENDANTS</idlml> state.}}
+
{{Documentation/Note|A problem arises when the number of children becomes very large, as with Calc tables where the number of cells in a sheet is huge. Registering at every cell certainly is not an option. The solution to this problem is the introduction of the <idlm>com.sun.star.accessibility.AccessibleStateType:TRANSIENT</idlm> state, which tells an AT not to register but to expect <idlm>com.sun.star.accessibility.AccessibleEventId:ACTIVE_DESCENDANT_CHANGED</idlm> events sent from their parent. To prevent the AT from having to ask every child whether it is transient, the parent must set the <idlm>com.sun.star.accessibility.AccessibleStateType:MANAGES_DESCENDANTS</idlm> state.}}
  
 
{{PDL1}}
 
{{PDL1}}
  
 
[[Category:Documentation/Developer's Guide/Accessibility]]
 
[[Category:Documentation/Developer's Guide/Accessibility]]

Revision as of 17:48, 16 March 2012



The com.sun.star.accessibility.XAccessibleEventBroadcaster and com.sun.star.accessibility.XAccessibleEventListener interface combo lets you register and unregister listeners. Events are represented by com.sun.star.accessibility.AccessibleEventObject structure. The different event types are listed and explained in the com.sun.star.accessibility.AccessibleEventId constants group.

Again, event types can be divided into two classes depending on whether they describe changes in the structure of the accessibility tree or changes in the internal state or the visual appearance of an accessible object. The first group consists of CHILD and INVALIDATE_ALL_CHILDREN. The first denotes a newly inserted or a removed child. The second is used in cases where more than one child has been inserted or removed and tells the listener to re-fetch a complete list of children.

The second group comprises all other event types. Typical members are VISIBLE_DATA_CHANGED and STATE_CHANGED, which inform listeners that the visual appearance of an object has changed (for example, to a different text color) or that one of its states has been switched on or off (for example, when an object becomes focused or selected).

The event types CONTROLLED_BY_RELATION_CHANGED, CONTROLLER_FOR_RELATION_CHANGED, LABEL_FOR_RELATION_CHANGED, LABELED_BY_RELATION_CHANGED, MEMBER_OF_RELATION_CHANGED, CONTENT_FLOWS_FROM_RELATION_CHANGED and CONTENT_FLOWS_TO_RELATION_CHANGED may be thought of as constituting a third group. They describe changes of the more virtual structure formed by relations between accessible objects in different parts of an accessibility tree.

Events are sent after the respective change of an accessible object took place. This enables the listener to retrieve up-to-date values that are sent with the event.

Template:Documentation/Note

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages