diff options
author | Andre Fischer <af@openoffice.org> | 2002-04-19 12:50:04 +0000 |
---|---|---|
committer | Andre Fischer <af@openoffice.org> | 2002-04-19 12:50:04 +0000 |
commit | 6a13eb6524ac2144f09d4e839506e460ec831503 (patch) | |
tree | 5d0c3c6ea21dcb1e0536b712fe1df580c2be0f9a /toolkit/test | |
parent | 15c972394d32f885848a69890a1a9464b5f66146 (diff) |
#97772# Initial support for displaying selection and focus.
Diffstat (limited to 'toolkit/test')
-rwxr-xr-x | toolkit/test/accessibility/Canvas.java | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/toolkit/test/accessibility/Canvas.java b/toolkit/test/accessibility/Canvas.java index d4c406943521..f7a9ff5d960a 100755 --- a/toolkit/test/accessibility/Canvas.java +++ b/toolkit/test/accessibility/Canvas.java @@ -154,15 +154,18 @@ class Canvas else mnScaleFactor = nYScale; - int nCount = maObjectList.size(); - for (int i=0; i<nCount; i++) - { - AccessibleObject aAccessibleObject = (AccessibleObject)maObjectList.elementAt(i); - aAccessibleObject.paint ( - g, - mnXOffset, mnYOffset, mnScaleFactor, - mbShowDescriptions, mbShowNames); - } + // synchronized (maObjectList) + // { + int nCount = maObjectList.size(); + for (int i=0; i<nCount; i++) + { + AccessibleObject aAccessibleObject = (AccessibleObject)maObjectList.elementAt(i); + aAccessibleObject.paint ( + g, + mnXOffset, mnYOffset, mnScaleFactor, + mbShowDescriptions, mbShowNames); + } + // } // Paint highlighted frame around active object as the last thing. if (maActiveObject != null) @@ -223,7 +226,7 @@ class Canvas // Deselect currently active object. if (maActiveObject != null) { - maActiveObject.deselect (); + maActiveObject.unhighlight (); maActiveObject = null; repaint (); } @@ -254,7 +257,7 @@ class Canvas break; } } - if (selectObject (aNewActiveObject)) + if (highlightObject (aNewActiveObject)) { if (maActiveObject != null && maTree != null) { @@ -267,17 +270,17 @@ class Canvas } } - protected boolean selectObject (AccessibleObject aNewActiveObject) + protected boolean highlightObject (AccessibleObject aNewActiveObject) { if (aNewActiveObject != maActiveObject) { if (maActiveObject != null) - maActiveObject.deselect(); + maActiveObject.unhighlight(); maActiveObject = aNewActiveObject; if (maActiveObject != null) { - maActiveObject.select (); + maActiveObject.highlight (); } return true; } @@ -295,7 +298,7 @@ class Canvas if (aObject instanceof AccTreeNode) { AccessibleObject aAccessibleObject = (AccessibleObject)maObjects.get ((AccTreeNode)aObject); - if (selectObject (aAccessibleObject)) + if (highlightObject (aAccessibleObject)) repaint(); } } |