|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Adds accessibility to tree field callback. Classes implement this interface to provide accessible functionality to the tree nodes.
This interface should be implemented only if the accessible objects are different from tree nodes. Here is an example of a tree field with string elements.
public class MyTreeCallback implements TreeFieldCallback, AccessibleTreeFieldCallback
{
// draw tree field node
public void drawTreeItem( TreeField treeField, Graphics graphics, int node, int y, int width, int indent )
{
String nodeLabel = treeField.getCookie( node );
graphics.drawText( nodeLabel, 0, y );
}
// return accessible wrapped element
public AccessibleContext getAccessible( TreeField treeField, int node )
{
String nodeLabel = treeField.getCookie( node );
AccessibleContext accessible = new MyAccessibleLabelWrapper( nodeLabel );
return accessible;
}
}
TreeField's getAccessibleChildAt() method checks whether the callback implements AccessibleTreeFieldCallback interface and if so calls it. Otherwise it uses the node cookie element.
TreeFieldCallback| Method Summary | ||
AccessibleContext |
getAccessible(TreeField treeField,
int node)
Returns accessible element at specified tree node |
|
| Method Detail |
public AccessibleContext getAccessible(TreeField treeField, int node)
treeField - accessible tree field that displays the treenode - index of the element
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2009 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.