diff options
Diffstat (limited to 'toolkit/test/accessibility/Canvas.java')
-rwxr-xr-x | toolkit/test/accessibility/Canvas.java | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/toolkit/test/accessibility/Canvas.java b/toolkit/test/accessibility/Canvas.java index a1d8fb0f7d08..a9614c81e4bb 100755 --- a/toolkit/test/accessibility/Canvas.java +++ b/toolkit/test/accessibility/Canvas.java @@ -19,7 +19,7 @@ import com.sun.star.accessibility.XAccessibleComponent; <p>The canvas listens to selection events of the associated JTree and highlights the first selected node of that tree.</p> */ -class Canvas +class Canvas extends JPanel implements MouseListener, MouseMotionListener, TreeSelectionListener//, Scrollable { @@ -48,7 +48,7 @@ class Canvas } /** Tell the canvas which tree view to use to highlight accessible - objects. + objects. */ public void setTree (JTree aTree) { @@ -67,7 +67,7 @@ class Canvas if (maNodes.indexOf (aNode) == -1) { maNodes.add (aNode); - + CanvasShape aObject = (CanvasShape) maObjects.get (aNode); if (aObject == null) { @@ -77,7 +77,7 @@ class Canvas maBoundingBox = aObject.getBBox(); else maBoundingBox = maBoundingBox.union (aObject.getBBox()); - + maObjects.put (aNode, aObject); maObjectList.add (aObject); @@ -109,14 +109,14 @@ class Canvas aObject.update(); } } - + public void updateNodeGeometry (AccTreeNode aNode) { CanvasShape aObject = (CanvasShape)maObjects.get(aNode); if (aObject != null) aObject.updateGeometry(); } - + public void clear () { while (maNodes.size() > 0) @@ -159,7 +159,7 @@ class Canvas Options.SetBoolean ("Antialiasing", bNewValue); repaint (); } - + public boolean getShowText () { return Options.GetBoolean ("ShowText"); @@ -191,10 +191,10 @@ class Canvas Graphics2D g2 = (Graphics2D)g; if (getAntialiasing()) - g2.setRenderingHint (RenderingHints.KEY_ANTIALIASING, + g2.setRenderingHint (RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); else - g2.setRenderingHint (RenderingHints.KEY_ANTIALIASING, + g2.setRenderingHint (RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); setupTransformation (); @@ -212,7 +212,7 @@ class Canvas g2.fill (aScreen); g2.setColor (Color.BLACK); g2.draw (aScreen); - + synchronized (maObjectList) { int nCount = maObjectList.size(); @@ -228,7 +228,7 @@ class Canvas bShowDescriptions, bShowNames, bShowText); } } - + // Paint highlighted frame around active object as the last thing. if (maActiveObject != null) maActiveObject.paint_highlight ( @@ -278,7 +278,7 @@ class Canvas // Calculate the scales that would map the screen onto the // widget in both of the coordinate axes and select the // smaller - // of the two: it maps the screen onto the widget in both + // of the two: it maps the screen onto the widget in both // axes at the same time. double nHScale = (aWidgetSize.getWidth() - 10) / aScreenSize.getWidth(); double nVScale = (aWidgetSize.getHeight() - 10) / aScreenSize.getHeight(); @@ -299,7 +299,7 @@ class Canvas mnHOffset = 0; if (mnVOffset < 0) mnVOffset = 0; - + setPreferredSize (new Dimension ( (int)(2*mnHOffset + mnScale * aScreenSize.getWidth()), (int)(2*mnVOffset + mnScale * aScreenSize.getHeight()))); @@ -316,8 +316,8 @@ class Canvas } maLastWidgetSize = aWidgetSize; } - - + + /** Call getAccessibleAt to determine accessible object under mouse. */ @@ -388,7 +388,7 @@ class Canvas { if (maActiveObject != null) maActiveObject.unhighlight(); - + maActiveObject = aNewActiveObject; if (maActiveObject != null) { @@ -406,7 +406,7 @@ class Canvas else return false; } - + /** Called when the selection of the tree changes. Highlight the corresponding graphical representation of the first selected object. */ @@ -422,7 +422,7 @@ class Canvas } } - private int + private int mnXAnchor, mnYAnchor, maResizeFlag; @@ -430,19 +430,19 @@ class Canvas mnHOffset, mnVOffset, mnScale; - private CanvasShape + private CanvasShape maActiveObject; private java.util.HashMap maObjects; - private Vector + private Vector maObjectList, maContexts, maNodes; - private Rectangle + private Rectangle maBoundingBox; private JTree maTree; // The size of the widget at the last call of setupTransformation() - private Dimension + private Dimension maLastWidgetSize; } |