summaryrefslogtreecommitdiff
path: root/accessibility/workben/org/openoffice/accessibility/awb
diff options
context:
space:
mode:
Diffstat (limited to 'accessibility/workben/org/openoffice/accessibility/awb')
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/AccessibilityWorkBench.java80
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/HelpWindow.java2
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/canvas/Canvas.java40
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/canvas/CanvasShape.java46
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/canvas/MouseObserver.java4
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/canvas/ShapeContainer.java12
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityModel.java26
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityNode.java28
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityTree.java12
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityTreeModel.java10
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/tree/DynamicAccessibilityModel.java22
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/tree/DynamicAccessibilityNode.java8
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/tree/ToolkitNode.java28
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/view/ComponentView.java16
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/view/ContextView.java4
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/view/EditableTextView.java4
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/view/EventMonitorView.java2
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/view/FocusView.java2
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/view/LayoutManager.java2
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/view/ObjectView.java2
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/view/ObjectViewContainer.java22
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/view/ParentView.java6
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/view/SelectionView.java14
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/view/ServiceInterfaceView.java4
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/view/StateSetView.java6
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/view/TableView.java6
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/view/TextView.java30
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/view/ViewGridLayout.java4
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/view/text/CaretSpinnerModel.java6
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/view/text/TextActionDialog.java34
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/view/text/TextAttributeDialog.java50
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/view/text/TextDialogFactory.java22
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/view/text/TextEditDialog.java10
33 files changed, 282 insertions, 282 deletions
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/AccessibilityWorkBench.java b/accessibility/workben/org/openoffice/accessibility/awb/AccessibilityWorkBench.java
index 6e8e45bc4e82..fa4fd69d16a7 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/AccessibilityWorkBench.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/AccessibilityWorkBench.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -79,10 +79,10 @@ import org.openoffice.accessibility.awb.view.ObjectViewContainerWindow;
@see Canvas
for the graphical view of the accessible objects.
*/
-public class AccessibilityWorkBench
- extends JFrame
- implements XTerminateListener,
- ActionListener,
+public class AccessibilityWorkBench
+ extends JFrame
+ implements XTerminateListener,
+ ActionListener,
TreeSelectionListener
{
public static final String msVersion = "v1.9";
@@ -107,7 +107,7 @@ public class AccessibilityWorkBench
sPipeName = args[++i];
}
}
-
+
saWorkBench = new AccessibilityWorkBench (sPipeName);
}
@@ -136,7 +136,7 @@ public class AccessibilityWorkBench
OfficeConnection.SetPipeName (sPipeName);
Options.Instance().Load (msOptionsFileName);
Layout ();
-
+
MessageArea.println (System.getProperty ("os.name") + " / "
+ System.getProperty ("os.arch") + " / "
+ System.getProperty ("os.version"));
@@ -145,7 +145,7 @@ public class AccessibilityWorkBench
maTree.addTreeSelectionListener (this);
addWindowListener (new WindowAdapter ()
- { public void windowClosing (WindowEvent e) {Quit();} }
+ { public void windowClosing (WindowEvent e) {Quit();} }
);
OfficeConnection.Instance().AddConnectionListener (this);
@@ -156,7 +156,7 @@ public class AccessibilityWorkBench
/** Create and arrange the widgets of the GUI.
- */
+ */
public void Layout ()
{
setSize (new java.awt.Dimension (800,600));
@@ -171,11 +171,11 @@ public class AccessibilityWorkBench
// Accessible Tree.
javax.swing.tree.TreeModel treeModel = new DynamicAccessibilityModel();
maTree = new AccessibilityTree(treeModel);
- // Add the model as tree listeners to be able to populate/clear the
+ // Add the model as tree listeners to be able to populate/clear the
// child lists on demand.
maTree.addTreeExpansionListener((TreeExpansionListener) treeModel);
maTree.addTreeWillExpandListener((TreeWillExpandListener) treeModel);
-
+
JScrollPane aTreeScrollPane = new JScrollPane(
maTree,
JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
@@ -200,7 +200,7 @@ public class AccessibilityWorkBench
// Split pane for tree view and object view.
JSplitPane aLeftViewSplitPane = new JSplitPane (
JSplitPane.VERTICAL_SPLIT,
- aTreeScrollPane,
+ aTreeScrollPane,
aObjectViewContainerScrollPane
);
aLeftViewSplitPane.setDividerLocation (300);
@@ -209,7 +209,7 @@ public class AccessibilityWorkBench
// Canvas.
maCanvas = new Canvas ();
maCanvas.SetTree (maTree);
- JScrollPane aScrolledCanvas = new JScrollPane(maCanvas,
+ JScrollPane aScrolledCanvas = new JScrollPane(maCanvas,
JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
aScrolledCanvas.getViewport().setBackground (java.awt.Color.RED);
@@ -218,7 +218,7 @@ public class AccessibilityWorkBench
// Split pane for tree view and canvas.
JSplitPane aViewSplitPane = new JSplitPane (
JSplitPane.HORIZONTAL_SPLIT,
- aLeftViewSplitPane,
+ aLeftViewSplitPane,
aScrolledCanvas
);
aViewSplitPane.setOneTouchExpandable(true);
@@ -229,7 +229,7 @@ public class AccessibilityWorkBench
MessageArea.Instance().setPreferredSize (new java.awt.Dimension(600,50));
JSplitPane aSplitPane = new JSplitPane (
JSplitPane.VERTICAL_SPLIT,
- aViewSplitPane,
+ aViewSplitPane,
MessageArea.Instance());
aSplitPane.setOneTouchExpandable(true);
aSplitPane.setContinuousLayout (true);
@@ -248,7 +248,7 @@ public class AccessibilityWorkBench
// maUpdateButton = createButton ("Update", "update");
// maShapesButton = createButton ("Expand Shapes", "shapes");
maExpandButton = createButton ("Expand All", "expand");
- maQuitButton = createButton ("Quit", "quit");
+ maQuitButton = createButton ("Quit", "quit");
UpdateButtonStates ();
setJMenuBar (CreateMenuBar ());
@@ -267,10 +267,10 @@ public class AccessibilityWorkBench
/** Shortcut method for adding an object to a GridBagLayout.
*/
- void addGridElement (JComponent object,
- int x, int y,
- int width, int height,
- int weightx, int weighty,
+ void addGridElement (JComponent object,
+ int x, int y,
+ int width, int height,
+ int weightx, int weighty,
int anchor, int fill)
{
GridBagConstraints constraints = new GridBagConstraints ();
@@ -297,7 +297,7 @@ public class AccessibilityWorkBench
aButton.setEnabled (false);
aButton.setActionCommand (command);
aButton.addActionListener (this);
-
+
maButtonBar.add (aButton);
return aButton;
}
@@ -314,7 +314,7 @@ public class AccessibilityWorkBench
{
// Menu bar.
maMenuBar = new JMenuBar ();
-
+
// File menu.
JMenu aFileMenu = new JMenu ("File");
maMenuBar.add (aFileMenu);
@@ -358,22 +358,22 @@ public class AccessibilityWorkBench
JMenu aOptionsMenu = new JMenu ("Options");
maMenuBar.add (aOptionsMenu);
JCheckBoxMenuItem aCBItem;
- aCBItem = new JCheckBoxMenuItem ("Show Descriptions",
+ aCBItem = new JCheckBoxMenuItem ("Show Descriptions",
Options.GetBoolean("ShowDescriptions"));
aOptionsMenu.add (aCBItem);
aCBItem.addActionListener (this);
- aCBItem = new JCheckBoxMenuItem ("Show Names",
+ aCBItem = new JCheckBoxMenuItem ("Show Names",
Options.GetBoolean ("ShowNames"));
aOptionsMenu.add (aCBItem);
aCBItem.addActionListener (this);
- aCBItem = new JCheckBoxMenuItem ("Show Text",
+ aCBItem = new JCheckBoxMenuItem ("Show Text",
Options.GetBoolean ("ShowText"));
aOptionsMenu.add (aCBItem);
aCBItem.addActionListener (this);
- aCBItem = new JCheckBoxMenuItem ("Antialiased Rendering",
+ aCBItem = new JCheckBoxMenuItem ("Antialiased Rendering",
Options.GetBoolean ("Antialiasing"));
aOptionsMenu.add (aCBItem);
aCBItem.addActionListener (this);
@@ -381,7 +381,7 @@ public class AccessibilityWorkBench
// Help menu.
JMenu aHelpMenu = new JMenu ("Help");
maMenuBar.add (aHelpMenu);
-
+
aItem = new JMenuItem ("Help");
aHelpMenu.add (aItem);
aItem.addActionListener (this);
@@ -411,7 +411,7 @@ public class AccessibilityWorkBench
protected void Initialize ()
{
maCanvas.SetTree (maTree);
-
+
SimpleOffice aOffice = SimpleOffice.Instance ();
if (aOffice != null)
{
@@ -444,7 +444,7 @@ public class AccessibilityWorkBench
/** Callback for GUI actions from the buttons.
*/
- public void actionPerformed (ActionEvent aEvent)
+ public void actionPerformed (ActionEvent aEvent)
{
String sCommand = aEvent.getActionCommand();
if (sCommand.equals("connect"))
@@ -458,7 +458,7 @@ public class AccessibilityWorkBench
}
else if (sCommand.equals("update"))
{
-// maTree.Dispose();
+// maTree.Dispose();
Initialize ();
}
else if (sCommand.equals("shapes"))
@@ -485,25 +485,25 @@ public class AccessibilityWorkBench
}
else if (sCommand.equals ("Show Descriptions"))
{
- Options.SetBoolean ("ShowDescriptions",
+ Options.SetBoolean ("ShowDescriptions",
((JCheckBoxMenuItem)aEvent.getSource()).getState());
maCanvas.repaint();
}
else if (sCommand.equals ("Show Names"))
{
- Options.SetBoolean ("ShowNames",
+ Options.SetBoolean ("ShowNames",
((JCheckBoxMenuItem)aEvent.getSource()).getState());
maCanvas.repaint();
}
else if (sCommand.equals ("Show Text"))
{
- Options.SetBoolean ("ShowText",
+ Options.SetBoolean ("ShowText",
((JCheckBoxMenuItem)aEvent.getSource()).getState());
maCanvas.repaint();
}
else if (sCommand.equals ("Antialiased Rendering"))
{
- Options.SetBoolean ("Antialiasing",
+ Options.SetBoolean ("Antialiasing",
((JCheckBoxMenuItem)aEvent.getSource()).getState());
maCanvas.repaint();
}
@@ -560,7 +560,7 @@ public class AccessibilityWorkBench
TreePath aSelectionPath = maTree.getSelectionPath();
if (aSelectionPath != null)
{
- javax.swing.tree.TreeNode aSelectedNode =
+ javax.swing.tree.TreeNode aSelectedNode =
(javax.swing.tree.TreeNode)aSelectionPath.getLastPathComponent();
if (aSelectedNode instanceof XAccessible) {
new ObjectViewContainerWindow (((XAccessible) aSelectedNode).getAccessibleContext());
@@ -580,7 +580,7 @@ public class AccessibilityWorkBench
Tell the object view and the canvas about the selected object.
*/
public void valueChanged (TreeSelectionEvent aEvent) {
-
+
if (aEvent.isAddedPath()) {
Cursor aCursor = getCursor();
setCursor (new Cursor (Cursor.WAIT_CURSOR));
@@ -664,7 +664,7 @@ public class AccessibilityWorkBench
// maTree.expandRow (0);
// Register the top window listener.
- XExtendedToolkit xToolkit =
+ XExtendedToolkit xToolkit =
SimpleOffice.Instance().GetExtendedToolkit();
if (xToolkit != null)
{
@@ -682,15 +682,15 @@ public class AccessibilityWorkBench
}
/// The Singleton Workbench object.
- private static AccessibilityWorkBench
+ private static AccessibilityWorkBench
saWorkBench = null;
-
+
private JPanel maMainPanel;
private JPanel maButtonBar;
private Canvas maCanvas;
private AccessibilityTree maTree;
private ObjectViewContainer maObjectViewContainer;
- private JButton
+ private JButton
maConnectButton,
maQuitButton,
maUpdateButton,
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/HelpWindow.java b/accessibility/workben/org/openoffice/accessibility/awb/HelpWindow.java
index 2f9671d191e5..9aae024ffb70 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/HelpWindow.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/HelpWindow.java
@@ -120,7 +120,7 @@ public class HelpWindow
{}
}
- public void actionPerformed (java.awt.event.ActionEvent e)
+ public void actionPerformed (java.awt.event.ActionEvent e)
{
if (e.getActionCommand().equals("Prev"))
{
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/canvas/Canvas.java b/accessibility/workben/org/openoffice/accessibility/awb/canvas/Canvas.java
index 86b642e8091c..78855b5a3d48 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/canvas/Canvas.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/canvas/Canvas.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -56,7 +56,7 @@ import org.openoffice.accessibility.misc.Options;
<p>The canvas listens to selection events of the associated JTree and
highlights the first selected node of that tree.</p>
*/
-public class Canvas
+public class Canvas
extends JPanel
{
// This constant can be passed to SetZoomMode to always show the whole screen.
@@ -77,7 +77,7 @@ public class Canvas
/** Tell the canvas which tree to use to highlight accessible
- objects and to observe for changes in the tree structure.
+ objects and to observe for changes in the tree structure.
*/
public void SetTree (javax.swing.JTree aTree)
{
@@ -116,10 +116,10 @@ public class Canvas
Graphics2D g2 = (Graphics2D)g;
if (Options.GetBoolean("Antialiasing"))
- 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 ();
@@ -139,7 +139,7 @@ public class Canvas
g2.fill (aScreen);
g2.setColor (Color.BLACK);
g2.draw (aScreen);
-
+
synchronized (maShapeList)
{
Iterator aShapeIterator = maShapeList.GetIterator();
@@ -148,7 +148,7 @@ public class Canvas
boolean bShowText = Options.GetBoolean ("ShowText");
while (aShapeIterator.hasNext())
{
- CanvasShape aCanvasShape =
+ CanvasShape aCanvasShape =
(CanvasShape)aShapeIterator.next();
try
{
@@ -158,13 +158,13 @@ public class Canvas
}
catch (Exception aException)
{
- System.err.println ("caught exception while painting a shape:"
+ System.err.println ("caught exception while painting a shape:"
+ aException);
aException.printStackTrace (System.err);
}
}
}
-
+
// Paint highlighted frame around active object as the last thing.
if (maActiveObject != null)
maActiveObject.paint_highlight (g2);
@@ -216,11 +216,11 @@ public 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)
+ double nHScale = (aWidgetSize.getWidth() - 10)
/ aScreenSize.getWidth();
- double nVScale = (aWidgetSize.getHeight() - 10)
+ double nVScale = (aWidgetSize.getHeight() - 10)
/ aScreenSize.getHeight();
if (nHScale < nVScale)
mnScale = nHScale;
@@ -234,15 +234,15 @@ public class Canvas
// Calculate offsets that center the scaled screen inside
// the widget.
- mnHOffset = (aWidgetSize.getWidth()
+ mnHOffset = (aWidgetSize.getWidth()
- mnScale*aScreenSize.getWidth()) / 2.0;
- mnVOffset = (aWidgetSize.getHeight()
+ mnVOffset = (aWidgetSize.getHeight()
- mnScale*aScreenSize.getHeight()) / 2.0;
if (mnHOffset < 0)
mnHOffset = 0;
if (mnVOffset < 0)
mnVOffset = 0;
-
+
setPreferredSize (new Dimension (
(int)(2*mnHOffset + mnScale * aScreenSize.getWidth()),
(int)(2*mnVOffset + mnScale * aScreenSize.getHeight())));
@@ -259,8 +259,8 @@ public class Canvas
}
maLastWidgetSize = aWidgetSize;
}
-
-
+
+
protected boolean HighlightObject (CanvasShape aNewActiveObject)
{
@@ -268,7 +268,7 @@ public class Canvas
{
if (maActiveObject != null)
maActiveObject.Highlight (false);
-
+
maActiveObject = aNewActiveObject;
if (maActiveObject != null)
{
@@ -292,7 +292,7 @@ public class Canvas
-
+
/** Called when the selection of the tree changes. Highlight the
corresponding graphical representation of the object.
*/
@@ -305,7 +305,7 @@ public class Canvas
- private int
+ private int
mnXAnchor,
mnYAnchor,
maResizeFlag;
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/canvas/CanvasShape.java b/accessibility/workben/org/openoffice/accessibility/awb/canvas/CanvasShape.java
index f2595351a4f5..14059046625c 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/canvas/CanvasShape.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/canvas/CanvasShape.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -48,7 +48,7 @@ class CanvasShape implements XAccessibleEventListener
public final Color maHighlightColor = Color.red;
public final Color maSelectionColor = Color.green;
public final Color maFocusColor = Color.blue;
-
+
public CanvasShape (javax.swing.tree.TreeNode aNode, Canvas aCanvas)
{
maNode = aNode;
@@ -74,7 +74,7 @@ class CanvasShape implements XAccessibleEventListener
public javax.swing.tree.TreePath getNodePath (javax.swing.tree.TreeNode node)
{
javax.swing.tree.TreeNode parent = node.getParent();
- return (parent != null) ?
+ return (parent != null) ?
getNodePath(parent).pathByAddingChild(node) :
new javax.swing.tree.TreePath(node);
}
@@ -86,7 +86,7 @@ class CanvasShape implements XAccessibleEventListener
- /** Update the data obtained from the <type>AccessibilityNode</type>
+ /** Update the data obtained from the <type>AccessibilityNode</type>
object.
*/
public void Update ()
@@ -111,7 +111,7 @@ class CanvasShape implements XAccessibleEventListener
mbFocused = xStateSet.contains (AccessibleStateType.FOCUSED);
}
}
-
+
UpdateGeometry ();
if (mxComponent != null)
@@ -137,7 +137,7 @@ class CanvasShape implements XAccessibleEventListener
{
if (mxComponent != null)
{
- com.sun.star.awt.Point aLocationOnScreen =
+ com.sun.star.awt.Point aLocationOnScreen =
mxComponent.getLocationOnScreen();
com.sun.star.awt.Size aSizeOnScreen = mxComponent.getSize();
maPosition = new Point (
@@ -155,9 +155,9 @@ class CanvasShape implements XAccessibleEventListener
according to the specified offset and scale.
*/
public void paint (
- Graphics2D g,
- boolean bShowDescription,
- boolean bShowName,
+ Graphics2D g,
+ boolean bShowDescription,
+ boolean bShowName,
boolean bShowText)
{
try{
@@ -185,7 +185,7 @@ class CanvasShape implements XAccessibleEventListener
color = new Color (maFgColor.getRed(), maFgColor.getGreen(), maFgColor.getBlue());
g.setColor (color);
g.draw (maShape);
-
+
if (mbFocused)
{
g.setColor (maFocusColor);
@@ -240,18 +240,18 @@ class CanvasShape implements XAccessibleEventListener
private void paintName (Graphics2D g)
{
- g.drawString ("Name: " + msName,
- (float)maShape.x+5,
- (float)maShape.y+15);
+ g.drawString ("Name: " + msName,
+ (float)maShape.x+5,
+ (float)maShape.y+15);
}
private void paintDescription (Graphics2D g)
{
- g.drawString ("Description: " + msDescription,
- (float)maShape.x+5,
- (float)maShape.y+35);
+ g.drawString ("Description: " + msDescription,
+ (float)maShape.x+5,
+ (float)maShape.y+35);
}
@@ -274,10 +274,10 @@ class CanvasShape implements XAccessibleEventListener
{
com.sun.star.awt.Rectangle aRect =
xText.getCharacterBounds(i);
-
+
double x = maShape.x + aRect.X;
double y = maShape.y + aRect.Y + aRect.Height;
-
+
g.drawString (sText.substring(i, i+1), (float)x, (float)y);
}
}
@@ -319,7 +319,7 @@ class CanvasShape implements XAccessibleEventListener
{
return new Rectangle (maPosition, maSize);
}
-
+
public Point getOrigin ()
{
return maPosition;
@@ -364,12 +364,12 @@ class CanvasShape implements XAccessibleEventListener
break;
}
} catch (Exception aException) {
- System.err.println ("caught exception while updating a shape:"
+ System.err.println ("caught exception while updating a shape:"
+ aException);
aException.printStackTrace (System.err);
}
}
-
+
/** Callback for disposing events.
*/
public void disposing (com.sun.star.lang.EventObject e)
@@ -379,8 +379,8 @@ class CanvasShape implements XAccessibleEventListener
-
- private Canvas
+
+ private Canvas
maCanvas;
private javax.swing.tree.TreeNode
maNode;
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/canvas/MouseObserver.java b/accessibility/workben/org/openoffice/accessibility/awb/canvas/MouseObserver.java
index 3e7e2807906d..c2468ec38005 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/canvas/MouseObserver.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/canvas/MouseObserver.java
@@ -12,7 +12,7 @@ import javax.swing.tree.TreePath;
/** Observe the mouse and highlight shapes of the canvas when clicked.
*/
public class MouseObserver
- implements MouseListener,
+ implements MouseListener,
MouseMotionListener
{
public MouseObserver (Canvas aCanvas)
@@ -66,7 +66,7 @@ public class MouseObserver
}
- /** Search for the smallest shape that contains the mouse position.
+ /** Search for the smallest shape that contains the mouse position.
*/
protected CanvasShape FindCanvasShapeUnderMouse (MouseEvent e)
{
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/canvas/ShapeContainer.java b/accessibility/workben/org/openoffice/accessibility/awb/canvas/ShapeContainer.java
index 03ad4bf38c46..86e92cafed06 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/canvas/ShapeContainer.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/canvas/ShapeContainer.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -87,18 +87,18 @@ public class ShapeContainer
if (aShape == null)
{
aShape = new CanvasShape (aNode, maCanvas);
-
+
if (aNode instanceof XAccessibleEventBroadcaster)
((XAccessibleEventBroadcaster) aNode).addEventListener(aShape);
-
+
// Update bounding box that includes all objects.
if (maShapeList.size() == 0)
maBoundingBox = aShape.GetBBox();
else
maBoundingBox = maBoundingBox.union (aShape.GetBBox());
-
+
maShapeList.put (aNode, aShape);
-
+
maCanvas.repaint();
return true;
@@ -117,7 +117,7 @@ public class ShapeContainer
{
if (aNode instanceof XAccessibleEventBroadcaster)
((XAccessibleEventBroadcaster) aNode).removeEventListener(aShape);
-
+
maShapeList.remove (aNode);
maCanvas.SelectObject (null);
maCanvas.repaint ();
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityModel.java b/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityModel.java
index 159467778554..fa9afae92995 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityModel.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityModel.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -48,7 +48,7 @@ import com.sun.star.accessibility.XAccessibleEventListener;
public abstract class AccessibilityModel extends javax.swing.tree.DefaultTreeModel {
protected java.util.Hashtable nodeList;
- protected static DefaultMutableTreeNode disconnectedRootNode =
+ protected static DefaultMutableTreeNode disconnectedRootNode =
new DefaultMutableTreeNode("<not connected>");
/** Creates a new instance of AccessibilityModel */
@@ -57,7 +57,7 @@ public abstract class AccessibilityModel extends javax.swing.tree.DefaultTreeMod
nodeList = new java.util.Hashtable();
}
- /* Convenience method that creates a new Toolkit node from xToolkit
+ /* Convenience method that creates a new Toolkit node from xToolkit
* and sets as the new root object of the tree.
*/
public synchronized void setRoot(XExtendedToolkit xToolkit) {
@@ -78,7 +78,7 @@ public abstract class AccessibilityModel extends javax.swing.tree.DefaultTreeMod
}
}
}
-
+
/* Appends the new child to parent's child list */
public void addNodeInto(MutableTreeNode newChild, MutableTreeNode parent) {
int index = parent.getChildCount();
@@ -87,14 +87,14 @@ public abstract class AccessibilityModel extends javax.swing.tree.DefaultTreeMod
}
insertNodeInto(newChild, parent, index);
}
-
+
/** Adds listener to the listener chain of node */
public static void addEventListener(TreeNode node, XAccessibleEventListener listener) {
if (node instanceof AccessibilityNode) {
((AccessibilityNode) node).addEventListener(listener);
}
}
-
+
/** Removes listener from the listener chain of node */
public static void removeEventListener(TreeNode node, XAccessibleEventListener listener) {
if (node instanceof AccessibilityNode) {
@@ -102,7 +102,7 @@ public abstract class AccessibilityModel extends javax.swing.tree.DefaultTreeMod
}
}
- protected abstract AccessibilityNode createWindowNode(XAccessible xAccessible,
+ protected abstract AccessibilityNode createWindowNode(XAccessible xAccessible,
XAccessibleContext xAccessibleContext);
protected abstract AccessibilityNode createNode(XAccessible xAccessible);
@@ -110,7 +110,7 @@ public abstract class AccessibilityModel extends javax.swing.tree.DefaultTreeMod
public AccessibilityNode putNode(XAccessible xAccessible, AccessibilityNode node) {
if (xAccessible != null) {
String oid = UnoRuntime.generateOid(xAccessible);
- java.lang.ref.WeakReference ref = (java.lang.ref.WeakReference)
+ java.lang.ref.WeakReference ref = (java.lang.ref.WeakReference)
nodeList.put(oid, new java.lang.ref.WeakReference(node));
if (ref != null) {
return (AccessibilityNode) ref.get();
@@ -118,12 +118,12 @@ public abstract class AccessibilityModel extends javax.swing.tree.DefaultTreeMod
}
return null;
}
-
+
/** Returns the AccessibilityNode for xAccessible */
public AccessibilityNode findNode(XAccessible xAccessible) {
if (xAccessible != null) {
String oid = UnoRuntime.generateOid(xAccessible);
- java.lang.ref.WeakReference ref =
+ java.lang.ref.WeakReference ref =
(java.lang.ref.WeakReference) nodeList.get(oid);
if (ref != null) {
return (AccessibilityNode) ref.get();
@@ -131,12 +131,12 @@ public abstract class AccessibilityModel extends javax.swing.tree.DefaultTreeMod
}
return null;
}
-
+
/** Removes the AccessibilityNode for xAccessible from the internal hashtable */
public AccessibilityNode removeNode(XAccessible xAccessible) {
if (xAccessible != null) {
String oid = UnoRuntime.generateOid(xAccessible);
- java.lang.ref.WeakReference ref =
+ java.lang.ref.WeakReference ref =
(java.lang.ref.WeakReference) nodeList.remove(oid);
if (ref != null) {
return (AccessibilityNode) ref.get();
@@ -144,7 +144,7 @@ public abstract class AccessibilityModel extends javax.swing.tree.DefaultTreeMod
}
return null;
}
-
+
public AccessibilityNode removeNode(Object o) {
if (o instanceof XAccessible) {
return removeNode((XAccessible) o);
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityNode.java b/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityNode.java
index 81a499aabf0d..4ca87d616d5a 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityNode.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityNode.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,12 +41,12 @@ import com.sun.star.accessibility.XAccessibleEventListener;
import com.sun.star.uno.UnoRuntime;
-class AccessibilityNode extends DefaultMutableTreeNode implements XAccessible,
+class AccessibilityNode extends DefaultMutableTreeNode implements XAccessible,
XAccessibleEventListener, XAccessibleEventBroadcaster {
protected AccessibilityModel treeModel;
protected XAccessibleContext unoAccessibleContext;
-
+
private XAccessibleEventListener listener;
public AccessibilityNode(AccessibilityModel treeModel) {
@@ -63,18 +63,18 @@ class AccessibilityNode extends DefaultMutableTreeNode implements XAccessible,
public void setAccessibleContext(XAccessibleContext xAccessibleContext) {
unoAccessibleContext = xAccessibleContext;
}
-
+
/** Returns the XAccessibleContext object of this node */
public XAccessibleContext getAccessibleContext() {
return unoAccessibleContext;
}
-
+
/** Attaches or Detaches the itself as listener to unoAccessibleContext */
protected void setAttached(boolean attach) {
XAccessibleContext xAccessibleContext = unoAccessibleContext;
if (xAccessibleContext != null) {
try {
- XAccessibleEventBroadcaster xAccessibleEventBroadcaster =
+ XAccessibleEventBroadcaster xAccessibleEventBroadcaster =
UnoRuntime.queryInterface( XAccessibleEventBroadcaster.class, xAccessibleContext );
if (xAccessibleEventBroadcaster != null) {
if (attach) {
@@ -87,20 +87,20 @@ class AccessibilityNode extends DefaultMutableTreeNode implements XAccessible,
// FIXME: error message !
}
}
- }
+ }
public void disposing(com.sun.star.lang.EventObject eventObject) {
XAccessibleEventListener localListener = this.listener;
if (localListener != null) {
localListener.disposing(eventObject);
}
-
+
treeModel.removeNode(userObject);
userObject = null;
unoAccessibleContext = null;
// FIXME: mark the object as being disposed in the tree view !
}
-
+
protected void handleChildRemoved(XAccessible xAccessible) {
final AccessibilityNode node = treeModel.findNode(xAccessible);
if (node != null) {
@@ -121,7 +121,7 @@ class AccessibilityNode extends DefaultMutableTreeNode implements XAccessible,
try {
XAccessibleContext xAC = node.getAccessibleContext();
if (xAC != null) {
- treeModel.insertNodeInto(node, parent,
+ treeModel.insertNodeInto(node, parent,
xAC.getAccessibleIndexInParent());
}
} catch (com.sun.star.uno.RuntimeException e) {
@@ -131,7 +131,7 @@ class AccessibilityNode extends DefaultMutableTreeNode implements XAccessible,
});
}
}
-
+
public void notifyEvent(AccessibleEventObject accessibleEventObject) {
if (accessibleEventObject.EventId == AccessibleEventId.CHILD) {
XAccessible xAccessible = UnoRuntime.queryInterface( XAccessible.class, accessibleEventObject.OldValue );
@@ -144,17 +144,17 @@ class AccessibilityNode extends DefaultMutableTreeNode implements XAccessible,
handleChildAdded(xAccessible);
}
}
-
+
XAccessibleEventListener localListener = this.listener;
if (localListener != null) {
localListener.notifyEvent(accessibleEventObject);
}
}
-
+
public synchronized void addEventListener(com.sun.star.accessibility.XAccessibleEventListener xAccessibleEventListener) {
listener = AccessibleEventMulticaster.add(listener, xAccessibleEventListener);
}
-
+
public synchronized void removeEventListener(com.sun.star.accessibility.XAccessibleEventListener xAccessibleEventListener) {
listener = AccessibleEventMulticaster.remove(listener, xAccessibleEventListener);
}
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityTree.java b/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityTree.java
index e485c993706a..59257702c88a 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityTree.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityTree.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,14 +40,14 @@ import com.sun.star.accessibility.XAccessibleContext;
*
*/
public class AccessibilityTree extends javax.swing.JTree {
-
+
/** Creates a new instance of AccessibilityTree */
public AccessibilityTree(javax.swing.tree.TreeModel model) {
super(model);
// always show handles to indicate expandable / collapsable
showsRootHandles = true;
}
-
+
public void setToolkit(XExtendedToolkit xToolkit) {
AccessibilityModel model = (AccessibilityModel) getModel();
if (model != null) {
@@ -58,8 +58,8 @@ public class AccessibilityTree extends javax.swing.JTree {
model.reload();
}
}
-
- public String convertValueToText(Object value, boolean selected,
+
+ public String convertValueToText(Object value, boolean selected,
boolean expanded, boolean leaf, int row, boolean hasFocus) {
if (value instanceof DefaultMutableTreeNode) {
@@ -82,7 +82,7 @@ public class AccessibilityTree extends javax.swing.JTree {
}
}
}
-
+
return super.convertValueToText(value, selected, expanded, leaf, row, hasFocus);
}
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityTreeModel.java b/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityTreeModel.java
index 6069c8f5f5ee..ad59cf8c9829 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityTreeModel.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityTreeModel.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -62,7 +62,7 @@ public class AccessibilityTreeModel
/** Calls to this method are dispatched to the given node but are
- observed for exceptions.
+ observed for exceptions.
*/
synchronized public boolean isLeaf (Object aObject)
{
@@ -89,7 +89,7 @@ public class AccessibilityTreeModel
}
catch (Exception aException)
{
- System.err.println ("caught exception in AccessibilityTreeModel.isLeaf():"
+ System.err.println ("caught exception in AccessibilityTreeModel.isLeaf():"
+ aException);
aException.printStackTrace (System.err);
}
@@ -116,7 +116,7 @@ public class AccessibilityTreeModel
synchronized public Object getChild (Object aParent, final int nIndex)
{
AccessibilityNode aChild = null;
-
+
final AccessibilityNode aParentNode = (AccessibilityNode)aParent;
// Try to get an existing child from the super class object.
@@ -173,7 +173,7 @@ public class AccessibilityTreeModel
}
-
+
/** Add a new child to the root node.
*/
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/tree/DynamicAccessibilityModel.java b/accessibility/workben/org/openoffice/accessibility/awb/tree/DynamicAccessibilityModel.java
index f2b4c6f0e97f..a0037ba69d69 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/tree/DynamicAccessibilityModel.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/tree/DynamicAccessibilityModel.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -43,11 +43,11 @@ import com.sun.star.accessibility.XAccessibleContext;
public class DynamicAccessibilityModel extends AccessibilityModel implements TreeExpansionListener, TreeWillExpandListener {
/* Creates a AccessibilityNode object for a window */
- protected AccessibilityNode createWindowNode(XAccessible xAccessible,
+ protected AccessibilityNode createWindowNode(XAccessible xAccessible,
XAccessibleContext xAccessibleContext) {
if (xAccessible != null) {
- // Some objects inherit XAccessible, but should not appear in
- // the hierarchy as toplevels (like sub-menus), so they don't
+ // Some objects inherit XAccessible, but should not appear in
+ // the hierarchy as toplevels (like sub-menus), so they don't
// return an accessible context.
if (xAccessibleContext != null) {
AccessibilityNode node = new AccessibilityNode(this);
@@ -59,12 +59,12 @@ public class DynamicAccessibilityModel extends AccessibilityModel implements Tre
}
return null;
}
-
+
/* Creates a DynamicAccessibilityNode object */
protected AccessibilityNode createNode(XAccessible xAccessible) {
if (xAccessible != null) {
try {
- // Some objects inherit XAccessible, but should not appear in
+ // Some objects inherit XAccessible, but should not appear in
// the hierarchy as toplevels (like sub-menus), so they don't
// return an accessible context.
XAccessibleContext xAccessibleContext = xAccessible.getAccessibleContext();
@@ -80,7 +80,7 @@ public class DynamicAccessibilityModel extends AccessibilityModel implements Tre
}
return null;
}
-
+
public void treeCollapsed(javax.swing.event.TreeExpansionEvent treeExpansionEvent) {
TreeNode node = (TreeNode) treeExpansionEvent.getPath().getLastPathComponent();
if (node instanceof DynamicAccessibilityNode) {
@@ -88,7 +88,7 @@ public class DynamicAccessibilityModel extends AccessibilityModel implements Tre
dynode.clear();
}
}
-
+
public void treeExpanded(javax.swing.event.TreeExpansionEvent treeExpansionEvent) {
TreeNode node = (TreeNode) treeExpansionEvent.getPath().getLastPathComponent();
if (node instanceof AccessibilityNode) {
@@ -99,7 +99,7 @@ public class DynamicAccessibilityModel extends AccessibilityModel implements Tre
}
}
}
-
+
public void treeWillCollapse(javax.swing.event.TreeExpansionEvent treeExpansionEvent)
throws javax.swing.tree.ExpandVetoException {
TreeNode node = (TreeNode) treeExpansionEvent.getPath().getLastPathComponent();
@@ -111,8 +111,8 @@ public class DynamicAccessibilityModel extends AccessibilityModel implements Tre
}
}
}
-
- public void treeWillExpand(javax.swing.event.TreeExpansionEvent treeExpansionEvent)
+
+ public void treeWillExpand(javax.swing.event.TreeExpansionEvent treeExpansionEvent)
throws javax.swing.tree.ExpandVetoException {
TreeNode node = (TreeNode) treeExpansionEvent.getPath().getLastPathComponent();
if (node instanceof DynamicAccessibilityNode) {
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/tree/DynamicAccessibilityNode.java b/accessibility/workben/org/openoffice/accessibility/awb/tree/DynamicAccessibilityNode.java
index a982ad71c4d5..da6f10c96191 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/tree/DynamicAccessibilityNode.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/tree/DynamicAccessibilityNode.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -66,14 +66,14 @@ class DynamicAccessibilityNode extends AccessibilityNode {
// FIXME: error message
} catch (com.sun.star.uno.RuntimeException e) {
// FIXME: error message
- }
+ }
}
-
+
// Clears the child list. Called by AccessibilityModel.treeCollapsed().
protected void clear() {
removeAllChildren();
}
-
+
/* This is called whenever the node is painted, no matter if collapsed
* or expanded. Making this a "life" value seems to be appropriate.
*/
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/tree/ToolkitNode.java b/accessibility/workben/org/openoffice/accessibility/awb/tree/ToolkitNode.java
index 8eaa9dab6c02..2599dfc7f0c1 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/tree/ToolkitNode.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/tree/ToolkitNode.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -42,19 +42,19 @@ import javax.swing.tree.DefaultMutableTreeNode;
/**
*
*/
-public class ToolkitNode extends DefaultMutableTreeNode
+public class ToolkitNode extends DefaultMutableTreeNode
implements com.sun.star.awt.XTopWindowListener {
-
+
protected XExtendedToolkit xToolkit;
-
+
private AccessibilityModel treeModel;
-
+
/** Creates a new instance of TopWindowListener */
public ToolkitNode(XExtendedToolkit xToolkit, AccessibilityModel treeModel) {
super("<connected>");
this.xToolkit = xToolkit;
this.treeModel = treeModel;
-
+
// Initially fill the child list
try {
for (int i=0,j=xToolkit.getTopWindowCount(); i<j; i++) {
@@ -70,11 +70,11 @@ public class ToolkitNode extends DefaultMutableTreeNode
}
}
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- // This should never happen since we properly check the count
+ // This should never happen since we properly check the count
// before - anyway returning what we got so far.
}
}
-
+
/** Returns an AccessibilityNode if xAccessible has a valid toplevel */
private AccessibilityNode getTopWindowNode(XAccessible xAccessible) {
XAccessibleContext xAC = xAccessible.getAccessibleContext();
@@ -103,7 +103,7 @@ public class ToolkitNode extends DefaultMutableTreeNode
}
}
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
-
+
}
}
return parent;
@@ -111,13 +111,13 @@ public class ToolkitNode extends DefaultMutableTreeNode
}
return null;
}
-
+
/** Returns the XAccessible interface corresponding to the toplevel window */
private AccessibilityNode getTopWindowNode(XTopWindow w) {
- XAccessible xAccessible = (XAccessible)
+ XAccessible xAccessible = (XAccessible)
UnoRuntime.queryInterface(XAccessible.class, w);
if (xAccessible != null) {
- // XTopWindows usually have an accessible parent, which is the
+ // XTopWindows usually have an accessible parent, which is the
// native container window ..
XAccessibleContext xAC = xAccessible.getAccessibleContext();
if (xAC != null) {
@@ -158,7 +158,7 @@ public class ToolkitNode extends DefaultMutableTreeNode
if (node != null && node.getParent() != this) {
node = (AccessibilityNode) node.getParent();
}
-
+
if (node != null) {
final AccessibilityNode an = node;
Runnable removeRun = new Runnable() {
@@ -169,7 +169,7 @@ public class ToolkitNode extends DefaultMutableTreeNode
// deadlocks, so removing the listeners here.
an.setAttached(false);
} catch (IllegalArgumentException e) {
- // for some toplevel we get more than one event -
+ // for some toplevel we get more than one event -
// ignoring
}
}
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/ComponentView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/ComponentView.java
index d4c0e102b7a9..42c0a5d82783 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/view/ComponentView.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/view/ComponentView.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -45,7 +45,7 @@ import com.sun.star.uno.UnoRuntime;
import org.openoffice.accessibility.misc.NameProvider;
/** The <type>ContextView</type> class displays information accessible over
- the <type>XAccessibleContext</type> interface. This includes name,
+ the <type>XAccessibleContext</type> interface. This includes name,
description, and role.
*/
public class ComponentView
@@ -77,7 +77,7 @@ public class ComponentView
maBackgroundColorLabel = aLayout.AddLabeledEntry ("Background Color: ");
}
-
+
public void SetObject (XAccessibleContext xContext)
{
mxComponent = (XAccessibleComponent)UnoRuntime.queryInterface(
@@ -102,7 +102,7 @@ public class ComponentView
com.sun.star.awt.Point aLocation = mxComponent.getLocation();
maRelativeLocationLabel.setText (
aLocation.X + ", " + aLocation.Y);
- com.sun.star.awt.Point aLocationOnScreen =
+ com.sun.star.awt.Point aLocationOnScreen =
mxComponent.getLocationOnScreen();
maAbsoluteLocationLabel.setText (
aLocationOnScreen.X + ", " + aLocationOnScreen.Y);
@@ -111,7 +111,7 @@ public class ComponentView
aSize.Width + ", " + aSize.Height);
com.sun.star.awt.Rectangle aBBox = mxComponent.getBounds();
maBoundingBoxLabel.setText (
- aBBox.X + ", " + aBBox.Y + ","
+ aBBox.X + ", " + aBBox.Y + ","
+ aBBox.Width + ", " + aBBox.Height);
int nColor = mxComponent.getForeground();
maForegroundColorLabel.setText (
@@ -135,7 +135,7 @@ public class ComponentView
sConsistency += (sConsistency.length()!=0?", ":"") +
"Bounding box conflicts with size";
XAccessible xParent = mxContext.getAccessibleParent();
- XAccessibleComponent xParentComponent =
+ XAccessibleComponent xParentComponent =
(XAccessibleComponent)UnoRuntime.queryInterface(
XAccessibleComponent.class, xParent);
if (xParentComponent == null)
@@ -148,9 +148,9 @@ public class ComponentView
}
else
{
- com.sun.star.awt.Point aParentLocationOnScreen =
+ com.sun.star.awt.Point aParentLocationOnScreen =
xParentComponent.getLocationOnScreen();
- if (aLocation.X+aParentLocationOnScreen.X
+ if (aLocation.X+aParentLocationOnScreen.X
!= aLocationOnScreen.X
|| aLocation.Y+aParentLocationOnScreen.Y
!= aLocationOnScreen.Y)
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/ContextView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/ContextView.java
index a8588cd18ca6..6989f414233a 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/view/ContextView.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/view/ContextView.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -43,7 +43,7 @@ import com.sun.star.accessibility.XAccessibleContext;
import org.openoffice.accessibility.misc.NameProvider;
/** The <type>ContextView</type> class displays information accessible over
- the <type>XAccessibleContext</type> interface. This includes name,
+ the <type>XAccessibleContext</type> interface. This includes name,
description, and role.
*/
public class ContextView
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/EditableTextView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/EditableTextView.java
index 2e39f117f62e..ae8b9cd47434 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/view/EditableTextView.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/view/EditableTextView.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -49,7 +49,7 @@ public class EditableTextView
ObjectViewContainer aContainer,
XAccessibleContext xContext)
{
- XAccessibleEditableText xEditableText =
+ XAccessibleEditableText xEditableText =
(XAccessibleEditableText)UnoRuntime.queryInterface(
XAccessibleEditableText.class, xContext);
if (xEditableText != null)
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/EventMonitorView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/EventMonitorView.java
index 67e8091e027f..f3228e36d5fd 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/view/EventMonitorView.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/view/EventMonitorView.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/FocusView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/FocusView.java
index 4dec27958d71..5a68a9294107 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/view/FocusView.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/view/FocusView.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/LayoutManager.java b/accessibility/workben/org/openoffice/accessibility/awb/view/LayoutManager.java
index 728b3dc426d7..0bbe0bd3e444 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/view/LayoutManager.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/view/LayoutManager.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/ObjectView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/ObjectView.java
index 3c1b8e90ff26..ada74f6dba0a 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/view/ObjectView.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/view/ObjectView.java
@@ -80,7 +80,7 @@ abstract public class ObjectView
/** Implement this method if you are interested in accessible events.
*/
- public void notifyEvent (AccessibleEventObject aEvent)
+ public void notifyEvent (AccessibleEventObject aEvent)
{}
/// Reference to the current object to display information about.
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/ObjectViewContainer.java b/accessibility/workben/org/openoffice/accessibility/awb/view/ObjectViewContainer.java
index 54855cbaf885..bc86cb3eef9e 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/view/ObjectViewContainer.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/view/ObjectViewContainer.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -126,7 +126,7 @@ public class ObjectViewContainer
Class aViewClass = (Class)maViewTemplates.elementAt (i);
Method aCreateMethod = aViewClass.getDeclaredMethod (
"Create", new Class[] {
- ObjectViewContainer.class,
+ ObjectViewContainer.class,
XAccessibleContext.class});
if (aCreateMethod != null)
{
@@ -137,13 +137,13 @@ public class ObjectViewContainer
}
}
catch (NoSuchMethodException e)
- {System.err.println ("Caught exception while creating view "
+ {System.err.println ("Caught exception while creating view "
+ i + " : " + e);}
catch (IllegalAccessException e)
- {System.err.println ("Caught exception while creating view "
+ {System.err.println ("Caught exception while creating view "
+ i + " : " + e);}
catch (InvocationTargetException e)
- {System.err.println ("Caught exception while creating view "
+ {System.err.println ("Caught exception while creating view "
+ i + " : " + e);}
}
@@ -227,7 +227,7 @@ public class ObjectViewContainer
/** Update the layout manager by setting the vertical weight of the
bottom entry to 1 and so make it strech to over the available
space.
-
+
*/
private void UpdateLayoutManager ()
{
@@ -250,10 +250,10 @@ public class ObjectViewContainer
*/
public void notifyEvent (final AccessibleEventObject aEvent)
{
- SwingUtilities.invokeLater(
- new Runnable()
+ SwingUtilities.invokeLater(
+ new Runnable()
{
- public void run()
+ public void run()
{
DispatchEvent (aEvent);
}
@@ -282,14 +282,14 @@ public class ObjectViewContainer
public void disposing (EventObject aEvent)
{
mxContext = null;
- SwingUtilities.invokeLater(
+ SwingUtilities.invokeLater(
new Runnable()
{
public void run()
{
SetObject (null);
}
- }
+ }
);
}
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/ParentView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/ParentView.java
index 216bc3a82bfc..828c3fd1a34a 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/view/ParentView.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/view/ParentView.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -87,13 +87,13 @@ public class ParentView
if (xParent != null)
{
maParentLabel.setText ("yes");
- XAccessibleContext xParentContext =
+ XAccessibleContext xParentContext =
xParent.getAccessibleContext();
if (xParentContext != null)
{
try
{
- XAccessible xChild =
+ XAccessible xChild =
xParentContext.getAccessibleChild(nIndex);
if (xChild != mxContext)
maValidLabel.setText ("yes");
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/SelectionView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/SelectionView.java
index ad5a83467372..4970546fd1ff 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/view/SelectionView.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/view/SelectionView.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -184,20 +184,20 @@ class SelectionView
{
XAccessible xChild = mxContext.getAccessibleChild(i);
XAccessibleContext xChildContext = xChild.getAccessibleContext();
-
+
String sName = i + " " + xChildContext.getAccessibleName();
JToggleButton aChild;
aChild = new JCheckBox (sName);
aChild.setFont (maContainer.GetViewFont());
- XAccessibleStateSet aChildStateSet =
+ XAccessibleStateSet aChildStateSet =
mxContext.getAccessibleStateSet();
- aChild.setSelected (aChildStateSet!=null
+ aChild.setSelected (aChildStateSet!=null
&& aChildStateSet.contains(AccessibleStateType.SELECTED));
-
+
aChild.addActionListener (this);
maChildrenSelector.add (aChild);
-
+
}
catch (IndexOutOfBoundsException e)
{
@@ -216,7 +216,7 @@ class SelectionView
{
mxSelection.clearAccessibleSelection();
}
-
+
/** Call the function associated with the pressed button.
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/ServiceInterfaceView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/ServiceInterfaceView.java
index 7c41ff01c97e..a6292d00be71 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/view/ServiceInterfaceView.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/view/ServiceInterfaceView.java
@@ -95,12 +95,12 @@ public class ServiceInterfaceView
{
maImplementationNameRoot.add (
new DefaultMutableTreeNode (
- (xServiceInfo!=null
+ (xServiceInfo!=null
? xServiceInfo.getImplementationName()
: "<XServiceInfo not supported>")));
}
}
-
+
private void CreateServiceTree ()
{
XServiceInfo xServiceInfo = (XServiceInfo)UnoRuntime.queryInterface(
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/StateSetView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/StateSetView.java
index 44638b099edc..a8c6b23b33c5 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/view/StateSetView.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/view/StateSetView.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -59,7 +59,7 @@ public class StateSetView
ObjectView aView = null;
if (xContext != null)
aView = new StateSetView (aContainer);
-
+
return aView;
}
@@ -112,7 +112,7 @@ public class StateSetView
Color aTextColor = g.getColor();
g.setRenderingHint (
- RenderingHints.KEY_ANTIALIASING,
+ RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
XAccessibleStateSet xStateSet = ( mxContext != null ) ? mxContext.getAccessibleStateSet() : null;
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/TableView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/TableView.java
index 07b5d2bb9b78..35f037916482 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/view/TableView.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/view/TableView.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -42,7 +42,7 @@ import com.sun.star.uno.UnoRuntime;
/** The <type>ContextView</type> class displays information accessible over
- the <type>XAccessibleContext</type> interface. This includes name,
+ the <type>XAccessibleContext</type> interface. This includes name,
description, and role.
*/
public class TableView
@@ -72,7 +72,7 @@ public class TableView
maSelectedColumnsLabel = aLayout.AddLabeledEntry ("Selected Columns: ");
}
-
+
public void SetObject (XAccessibleContext xContext)
{
mxTable = (XAccessibleTable)UnoRuntime.queryInterface(
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/TextView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/TextView.java
index 4a838aa85884..451097b5d6f3 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/view/TextView.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/view/TextView.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -70,7 +70,7 @@ public class TextView
extends ObjectView
implements ActionListener
{
-
+
/** Create a TextView when the given object supports the
XAccessibleText interface.
*/
@@ -171,8 +171,8 @@ public class TextView
Integer.toString(mxText.getCharacterCount()));
// Selection.
maSelectionLabel.setText (
- "[" + mxText.getSelectionStart()
- + "," + mxText.getSelectionEnd()
+ "[" + mxText.getSelectionStart()
+ + "," + mxText.getSelectionEnd()
+ "] \"" + mxText.getSelectedText() + "\"");
// Character bounds.
@@ -185,7 +185,7 @@ public class TextView
XAccessibleMultiLineText xMultiText = (XAccessibleMultiLineText)
UnoRuntime.queryInterface( XAccessibleMultiLineText.class, mxText );
- if( null != xMultiText ) {
+ if( null != xMultiText ) {
try {
maCaretLineNoLabel.setText ( Integer.toString( xMultiText.getNumberOfLineWithCaret() ) );
TextSegment ts = xMultiText.getTextAtLineWithCaret();
@@ -267,7 +267,7 @@ public class TextView
aCharacterArray.append (",");
nIndex ++;
}
- if (nMaxDisplayCount < nCharacterCount)
+ if (nMaxDisplayCount < nCharacterCount)
aCharacterArray.append (", ...");
}
catch (IndexOutOfBoundsException e)
@@ -280,7 +280,7 @@ public class TextView
- /** Iterate over all characters and translate their positions
+ /** Iterate over all characters and translate their positions
back and forth.
*/
private String GetTextBoundsString ()
@@ -310,14 +310,14 @@ public class TextView
}
}
catch (IndexOutOfBoundsException aEvent)
- {
+ {
// Ignore errors.
}
return aBuffer.toString();
}
-
+
private final static int BEFORE = -1;
@@ -346,7 +346,7 @@ public class TextView
DefaultMutableTreeNode aSegmentNode = new DefaultMutableTreeNode (
new StringBuffer (
Integer.toString (nIndex) + " -> "
- + Integer.toString (aSegment.SegmentStart) + " - "
+ + Integer.toString (aSegment.SegmentStart) + " - "
+ Integer.toString (aSegment.SegmentEnd) + " : "
+ aSegment.SegmentText.toString()));
aNode.add (aSegmentNode);
@@ -373,18 +373,18 @@ public class TextView
case BEFORE:
aSegment = mxText.getTextBeforeIndex (nIndex, nTextType);
break;
-
+
case AT:
aSegment = mxText.getTextAtIndex (nIndex, nTextType);
break;
-
+
case BEHIND:
aSegment = mxText.getTextBehindIndex (nIndex, nTextType);
break;
default:
aSegment = new TextSegment();
- aSegment.SegmentText = new String ("unknown position " + nWhere);
+ aSegment.SegmentText = new String ("unknown position " + nWhere);
aSegment.SegmentStart = nIndex;
aSegment.SegmentStart = nIndex+1;
break;
@@ -414,7 +414,7 @@ public class TextView
/** Add to the given node one node for every attribute of the given segment.
*/
private void AddAttributeNodes (
- DefaultMutableTreeNode aNode,
+ DefaultMutableTreeNode aNode,
TextSegment aSegment)
{
try
@@ -433,7 +433,7 @@ public class TextView
}
private XAccessibleText mxText;
- private JLabel
+ private JLabel
maTextLabel,
maCharacterArrayLabel,
maCharacterCountLabel,
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/ViewGridLayout.java b/accessibility/workben/org/openoffice/accessibility/awb/view/ViewGridLayout.java
index bc598dcaf2fa..196ec3ccdc64 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/view/ViewGridLayout.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/view/ViewGridLayout.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -78,7 +78,7 @@ class ViewGridLayout
constraints.fill = GridBagConstraints.NONE;
aComponent.setFont (saFont);
maComponent.add (aComponent, constraints);
-
+
mnCurrentLine += 1;
return aComponent;
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/text/CaretSpinnerModel.java b/accessibility/workben/org/openoffice/accessibility/awb/view/text/CaretSpinnerModel.java
index c210b0eff086..c6d7e09ea3cc 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/view/text/CaretSpinnerModel.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/view/text/CaretSpinnerModel.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -42,7 +42,7 @@ import com.sun.star.lang.IndexOutOfBoundsException;
*/
public class CaretSpinnerModel
implements SpinnerModel
-{
+{
public CaretSpinnerModel (XAccessibleText xText)
{
mxText = xText;
@@ -86,7 +86,7 @@ public class CaretSpinnerModel
{
if (mxText != null)
return new Integer (mxText.getCaretPosition());
- else
+ else
return null;
}
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextActionDialog.java b/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextActionDialog.java
index f37969d5ee59..257cd34e33be 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextActionDialog.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextActionDialog.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -51,13 +51,13 @@ import com.sun.star.uno.UnoRuntime;
/**
* Display a dialog with a text field and a pair of cancel/do-it buttons
*/
-class TextActionDialog
+class TextActionDialog
extends JDialog
implements ActionListener
{
public TextActionDialog (
XAccessibleContext xContext,
- String sExplanation,
+ String sExplanation,
String sTitle)
{
super();// AccessibilityWorkBench.Instance() );
@@ -96,7 +96,7 @@ class TextActionDialog
maText.setText (sText);
maText.setRows (sText.length() / 40 + 1);
maText.setColumns (Math.min (Math.max (40, sText.length()), 20));
-
+
JPanel aButtons = new JPanel();
aButtons.setLayout (new FlowLayout());
maIndexToggle = new JCheckBox ("reverse selection");
@@ -133,17 +133,17 @@ class TextActionDialog
}
- protected int GetSelectionStart()
- {
- return GetSelection(true);
+ protected int GetSelectionStart()
+ {
+ return GetSelection(true);
}
- protected int GetSelectionEnd()
+ protected int GetSelectionEnd()
{
- return GetSelection(false);
+ return GetSelection(false);
}
private int GetSelection (boolean bStart)
{
- if (bStart ^ maIndexToggle.isSelected())
+ if (bStart ^ maIndexToggle.isSelected())
return maText.getSelectionStart();
else
return maText.getSelectionEnd();
@@ -157,18 +157,18 @@ class TextActionDialog
boolean bSuccess = true;
try
{
- XAccessibleText xText =
+ XAccessibleText xText =
(XAccessibleText)UnoRuntime.queryInterface(
XAccessibleText.class, mxContext);
if (xText != null)
bSuccess = bSuccess && TextAction (xText);
- XAccessibleEditableText xEditableText =
+ XAccessibleEditableText xEditableText =
(XAccessibleEditableText)UnoRuntime.queryInterface(
XAccessibleEditableText.class, mxContext);
if (xEditableText != null)
bSuccess = bSuccess && EditableTextAction (xEditableText);
-
+
if ( ! bSuccess)
sError = "Can't execute";
}
@@ -179,9 +179,9 @@ class TextActionDialog
if (sError != null)
JOptionPane.showMessageDialog (
- this,// AccessibilityWorkBench.Instance(),
- sError,
- msTitle,
+ this,// AccessibilityWorkBench.Instance(),
+ sError,
+ msTitle,
JOptionPane.ERROR_MESSAGE);
Cancel();
@@ -194,7 +194,7 @@ class TextActionDialog
return true;
}
- boolean EditableTextAction (XAccessibleEditableText xText)
+ boolean EditableTextAction (XAccessibleEditableText xText)
throws IndexOutOfBoundsException
{
return true;
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextAttributeDialog.java b/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextAttributeDialog.java
index dad548ca730e..05d8ff480cee 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextAttributeDialog.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextAttributeDialog.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -48,7 +48,7 @@ import com.sun.star.lang.IndexOutOfBoundsException;
import com.sun.star.uno.UnoRuntime;
-class TextAttributeDialog
+class TextAttributeDialog
extends TextActionDialog
{
public TextAttributeDialog (XAccessibleContext xContext)
@@ -61,7 +61,7 @@ class TextAttributeDialog
protected void Layout ()
{
super.Layout ();
-
+
maForeground = Color.black;
maBackground = Color.white;
@@ -72,28 +72,28 @@ class TextAttributeDialog
maUnderlineCheckBox = new JCheckBox ("underline");
maItalicsCheckBox = new JCheckBox ("italics");
- JButton aForegroundButton = new JButton ("Foreground",
+ JButton aForegroundButton = new JButton ("Foreground",
new TextAttributeDialog.ColorIcon(true));
- aForegroundButton.addActionListener (new ActionListener()
+ aForegroundButton.addActionListener (new ActionListener()
{
- public void actionPerformed (ActionEvent aEvent)
- {
+ public void actionPerformed (ActionEvent aEvent)
+ {
maForeground = JColorChooser.showDialog (
- TextAttributeDialog.this,
- "Select Foreground Color",
+ TextAttributeDialog.this,
+ "Select Foreground Color",
maForeground);
}
} );
-
- JButton aBackgroundButton = new JButton("Background",
+
+ JButton aBackgroundButton = new JButton("Background",
new TextAttributeDialog.ColorIcon(false));
- aBackgroundButton.addActionListener (new ActionListener()
+ aBackgroundButton.addActionListener (new ActionListener()
{
public void actionPerformed (ActionEvent eEvent)
- {
+ {
maBackground = JColorChooser.showDialog(
- TextAttributeDialog.this,
- "Select Background Color",
+ TextAttributeDialog.this,
+ "Select Background Color",
maBackground);
}
} );
@@ -131,14 +131,14 @@ class TextAttributeDialog
aSequence[5] = new PropertyValue();
aSequence[5].Name = "CharBackTransparent";
aSequence[5].Value = new Boolean (false);
-
+
return xText.setAttributes (
- GetSelectionStart(),
+ GetSelectionStart(),
GetSelectionEnd(),
aSequence);
}
- class ColorIcon
+ class ColorIcon
implements Icon
{
public ColorIcon(boolean bWhich) { bForeground = bWhich; }
@@ -158,21 +158,21 @@ class TextAttributeDialog
else
return maBackground;
}
-
+
private static final int nHeight = 16;
private static final int nWidth = 16;
private boolean bForeground;
}
+
-
- private JCheckBox
- maBoldCheckBox,
- maUnderlineCheckBox,
+ private JCheckBox
+ maBoldCheckBox,
+ maUnderlineCheckBox,
maItalicsCheckBox;
- private Color
- maForeground,
+ private Color
+ maForeground,
maBackground;
}
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextDialogFactory.java b/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextDialogFactory.java
index cdb3f26b5e55..70371324d1bd 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextDialogFactory.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextDialogFactory.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -36,14 +36,14 @@ import com.sun.star.accessibility.XAccessibleText;
import com.sun.star.lang.IndexOutOfBoundsException;
import com.sun.star.uno.UnoRuntime;
-
+
/** Factory for dialogs of the text views.
-*/
+*/
public class TextDialogFactory
{
static public JDialog CreateSelectionDialog (XAccessibleContext xContext)
{
- JDialog aDialog = new TextActionDialog(
+ JDialog aDialog = new TextActionDialog(
xContext,
"Select range:",
"select")
@@ -51,8 +51,8 @@ public class TextDialogFactory
boolean TextAction (XAccessibleText xText)
throws IndexOutOfBoundsException
{
- return xText.setSelection(
- GetSelectionStart(),
+ return xText.setSelection(
+ GetSelectionStart(),
GetSelectionEnd() );
}
};
@@ -71,8 +71,8 @@ public class TextDialogFactory
boolean TextAction (XAccessibleText xText)
throws IndexOutOfBoundsException
{
- return xText.copyText(
- GetSelectionStart(),
+ return xText.copyText(
+ GetSelectionStart(),
GetSelectionEnd());
}
};
@@ -90,8 +90,8 @@ public class TextDialogFactory
boolean EditableTextAction (XAccessibleEditableText xText)
throws IndexOutOfBoundsException
{
- return xText.cutText(
- GetSelectionStart(),
+ return xText.cutText(
+ GetSelectionStart(),
GetSelectionEnd() );
}
};
@@ -120,7 +120,7 @@ public class TextDialogFactory
{
JDialog aDialog = new TextEditDialog (
xContext,
- "Edit text:",
+ "Edit text:",
"edit");
if (aDialog != null)
aDialog.show();
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextEditDialog.java b/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextEditDialog.java
index a8710cbad7cc..9d5aec4649f5 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextEditDialog.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextEditDialog.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -35,12 +35,12 @@ import com.sun.star.lang.IndexOutOfBoundsException;
import com.sun.star.uno.UnoRuntime;
-class TextEditDialog
+class TextEditDialog
extends TextActionDialog
{
public TextEditDialog (
XAccessibleContext xContext,
- String sExplanation,
+ String sExplanation,
String sTitle )
{
super (xContext, sExplanation, sTitle);
@@ -83,7 +83,7 @@ class TextEditDialog
nFront++;
int nBack = 0;
while ((nBack < nMinLength) &&
- (sNew.charAt(sNew.length()-nBack-1) ==
+ (sNew.charAt(sNew.length()-nBack-1) ==
sOld.charAt(sOld.length()-nBack-1) ))
nBack++;
if (nFront + nBack > nMinLength)
@@ -94,7 +94,7 @@ class TextEditDialog
String sDel = sOld.substring (nFront, sOld.length() - nBack);
String sIns = sNew.substring (nFront, sNew.length() - nBack);
- System.out.println ("edit text: " +
+ System.out.println ("edit text: " +
sOld.substring(0, nFront) +
" [ " + sDel + " -> " + sIns + " ] " +
sOld.substring(sOld.length() - nBack));