Class AccessibilityManager
Builds, caches, diffs, and dispatches actions for the portable semantic tree.
The tree is always constructed on the Codename One EDT. Native ports read the
last immutable snapshot and post actions through performAction(long, String, Object),
so native accessibility threads never synchronously enter application code.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionintHow many roots currently have a cached tree.intHow many roots are currently recorded as stale.A tree describing nothing.static AccessibilityManagerintgetSnapshot(Form form) The accessibility tree for a top level, which may be acom.codename1.ui.Windowrather than aForm.voidinvalidate(Component component, int changeType) voidbooleanperformAction(long nodeId, String actionId, Object argument) voidreleaseRoot(Container root) Drops any snapshot cached for a root that is going away.
-
Field Details
-
CHANGE_STRUCTURE
public static final int CHANGE_STRUCTURE- See Also:
-
CHANGE_CONTENT
public static final int CHANGE_CONTENT- See Also:
-
CHANGE_STATE
public static final int CHANGE_STATE- See Also:
-
CHANGE_VALUE
public static final int CHANGE_VALUE- See Also:
-
CHANGE_BOUNDS
public static final int CHANGE_BOUNDS- See Also:
-
CHANGE_FOCUS
public static final int CHANGE_FOCUS- See Also:
-
CHANGE_ACTIONS
public static final int CHANGE_ACTIONS- See Also:
-
CHANGE_LIVE_REGION
public static final int CHANGE_LIVE_REGION- See Also:
-
CHANGE_PANE
public static final int CHANGE_PANE- See Also:
-
CHANGE_ALL
public static final int CHANGE_ALL- See Also:
-
-
Method Details
-
dirtyRootCount
public int dirtyRootCount()How many roots are currently recorded as stale.
Returns
the size of the dirty set
-
emptySnapshot
A tree describing nothing.
For a surface that no longer exists. A port can outlive a window -- an accessibility bridge is held by the platform and asked for its tree after the window it describes has been disposed -- and the alternatives are both wrong: the last tree built anywhere belongs to some other window, and rebuilding is impossible with nothing to walk.
Returns
an empty snapshot, never null
-
cachedRootCount
public int cachedRootCount()How many roots currently have a cached tree.
Returns
the size of the snapshot cache
-
getInstance
-
invalidate
-
invalidateAll
public void invalidateAll() -
getCurrentSnapshot
-
getSnapshot
The accessibility tree for a top level, which may be a
com.codename1.ui.Windowrather than aForm.Parameters
top: the top level to describe, may be null
Returns
the snapshot, never null
-
releaseRoot
Drops any snapshot cached for a root that is going away.
Parameters
root: the root being disposed
-
getSnapshot
-
getPendingChanges
public int getPendingChanges() -
performAction
-