summaryrefslogtreecommitdiff
path: root/toolkit/test
diff options
context:
space:
mode:
authorAndre Fischer <af@openoffice.org>2003-04-25 13:49:42 +0000
committerAndre Fischer <af@openoffice.org>2003-04-25 13:49:42 +0000
commit1742bfa3e8ba33035fd4d6e447e98ed37e56cbc9 (patch)
treecdeb129e9aa48799c2aa4ca2a1e2ab392858f585 /toolkit/test
parent737b8c06386ea6a99b4f134c9b7becf35ed553da (diff)
Adaption to relocation of accessibility interfaces from drafts to final. Added View menu for setting the zoom factor.
Diffstat (limited to 'toolkit/test')
-rw-r--r--toolkit/test/accessibility/AccTreeNode.java2
-rwxr-xr-xtoolkit/test/accessibility/AccessibilityTree.java2
-rw-r--r--toolkit/test/accessibility/AccessibilityTreeModel.java2
-rwxr-xr-xtoolkit/test/accessibility/AccessibilityWorkBench.java93
-rw-r--r--toolkit/test/accessibility/AccessibleActionHandler.java4
-rw-r--r--toolkit/test/accessibility/AccessibleActionNode.java2
-rw-r--r--toolkit/test/accessibility/AccessibleCellHandler.java6
-rw-r--r--toolkit/test/accessibility/AccessibleComponentHandler.java4
-rw-r--r--toolkit/test/accessibility/AccessibleContextHandler.java6
-rw-r--r--toolkit/test/accessibility/AccessibleEditableTextHandler.java4
-rw-r--r--toolkit/test/accessibility/AccessibleExtendedComponentHandler.java4
-rw-r--r--toolkit/test/accessibility/AccessibleHyperlinkHandler.java4
-rw-r--r--toolkit/test/accessibility/AccessibleHypertextHandler.java4
-rw-r--r--toolkit/test/accessibility/AccessibleImageHandler.java4
-rw-r--r--toolkit/test/accessibility/AccessibleRelationHandler.java51
-rw-r--r--toolkit/test/accessibility/AccessibleSelectionHandler.java6
-rw-r--r--toolkit/test/accessibility/AccessibleTableHandler.java4
-rw-r--r--toolkit/test/accessibility/AccessibleTextHandler.java43
-rw-r--r--toolkit/test/accessibility/AccessibleTreeHandler.java4
-rw-r--r--toolkit/test/accessibility/AccessibleUNOHandler.java10
-rwxr-xr-xtoolkit/test/accessibility/Canvas.java121
-rw-r--r--toolkit/test/accessibility/CanvasShape.java18
-rw-r--r--toolkit/test/accessibility/ChildEventHandler.java4
-rw-r--r--toolkit/test/accessibility/ContextEventHandler.java8
-rw-r--r--toolkit/test/accessibility/EventHandler.java6
-rw-r--r--toolkit/test/accessibility/EventListener.java47
-rw-r--r--toolkit/test/accessibility/EventQueue.java2
-rw-r--r--toolkit/test/accessibility/GeometryEventHandler.java4
-rwxr-xr-xtoolkit/test/accessibility/InformationWriter.java10
-rw-r--r--toolkit/test/accessibility/NodeFactory.java2
-rw-r--r--toolkit/test/accessibility/NodeHandler.java2
-rw-r--r--toolkit/test/accessibility/NodeMap.java2
-rw-r--r--toolkit/test/accessibility/Options.java18
-rw-r--r--toolkit/test/accessibility/QueuedListener.java4
-rw-r--r--toolkit/test/accessibility/SelectionDialog.java8
-rwxr-xr-xtoolkit/test/accessibility/SimpleOffice.java12
-rw-r--r--toolkit/test/accessibility/TableEventHandler.java10
-rw-r--r--toolkit/test/accessibility/TextUpdateListener.java2
-rw-r--r--toolkit/test/accessibility/TopWindowListener.java7
-rw-r--r--toolkit/test/accessibility/news.html2
40 files changed, 332 insertions, 216 deletions
diff --git a/toolkit/test/accessibility/AccTreeNode.java b/toolkit/test/accessibility/AccTreeNode.java
index 1ce85b68eb2d..64a5a5a3c4f6 100644
--- a/toolkit/test/accessibility/AccTreeNode.java
+++ b/toolkit/test/accessibility/AccTreeNode.java
@@ -1,5 +1,5 @@
import com.sun.star.uno.UnoRuntime;
-import drafts.com.sun.star.accessibility.*;
+import com.sun.star.accessibility.*;
import java.util.Vector;
/**
diff --git a/toolkit/test/accessibility/AccessibilityTree.java b/toolkit/test/accessibility/AccessibilityTree.java
index 05e6faaa1456..819631b41eb8 100755
--- a/toolkit/test/accessibility/AccessibilityTree.java
+++ b/toolkit/test/accessibility/AccessibilityTree.java
@@ -1,4 +1,4 @@
-import drafts.com.sun.star.accessibility.*;
+import com.sun.star.accessibility.*;
import com.sun.star.lang.XServiceInfo;
import com.sun.star.lang.IndexOutOfBoundsException;
import com.sun.star.uno.UnoRuntime;
diff --git a/toolkit/test/accessibility/AccessibilityTreeModel.java b/toolkit/test/accessibility/AccessibilityTreeModel.java
index 9e7365bfac2c..d4981e86b4a0 100644
--- a/toolkit/test/accessibility/AccessibilityTreeModel.java
+++ b/toolkit/test/accessibility/AccessibilityTreeModel.java
@@ -7,7 +7,7 @@ import java.util.Vector;
import java.util.HashMap;
import java.util.Enumeration;
-import drafts.com.sun.star.accessibility.*;
+import com.sun.star.accessibility.*;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XInterface;
diff --git a/toolkit/test/accessibility/AccessibilityWorkBench.java b/toolkit/test/accessibility/AccessibilityWorkBench.java
index ad95b856f91f..f32725eaea78 100755
--- a/toolkit/test/accessibility/AccessibilityWorkBench.java
+++ b/toolkit/test/accessibility/AccessibilityWorkBench.java
@@ -20,14 +20,14 @@ import com.sun.star.frame.XModel;
import com.sun.star.frame.XTerminateListener;
import com.sun.star.uno.UnoRuntime;
-import drafts.com.sun.star.accessibility.XAccessible;
-import drafts.com.sun.star.accessibility.XAccessibleContext;
-import drafts.com.sun.star.accessibility.XAccessibleComponent;
-import drafts.com.sun.star.accessibility.XAccessibleExtendedComponent;
-import drafts.com.sun.star.accessibility.XAccessibleRelationSet;
-import drafts.com.sun.star.accessibility.XAccessibleStateSet;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.accessibility.XAccessibleComponent;
+import com.sun.star.accessibility.XAccessibleExtendedComponent;
+import com.sun.star.accessibility.XAccessibleRelationSet;
+import com.sun.star.accessibility.XAccessibleStateSet;
-import drafts.com.sun.star.awt.XExtendedToolkit;
+import com.sun.star.awt.XExtendedToolkit;
import java.util.Vector;
import java.awt.*;
@@ -54,9 +54,6 @@ public class AccessibilityWorkBench
public static void main (String args[])
{
int nPortNumber = 5678;
- String sFileName
- = "file:///tmp/impress-test-document.sxi";
- // = "file:///tmp/draw-test-document.sxd";
for (int i=0; i<args.length; i++)
{
@@ -66,9 +63,6 @@ public class AccessibilityWorkBench
System.out.println ("options:");
System.out.println (" -p <port-number> Port on which to connect to StarOffice.");
System.out.println (" Defaults to 5678.");
- System.out.println (" -f <file-name-URL> URL of document file which is loaded when");
- System.out.println (" clicking on the Load button. Don't forget");
- System.out.println (" the file:// prefix!");
System.exit (0);
}
else if (args[i].equals ("-p"))
@@ -145,11 +139,17 @@ public class AccessibilityWorkBench
maCanvas = new Canvas ();
maCanvas.setTree (maAccessibilityTree.getComponent());
maAccessibilityTree.SetCanvas (maCanvas);
- maCanvas.setPreferredSize (new Dimension (1000,1000));
+ JScrollPane aScrolledCanvas = new JScrollPane(maCanvas,
+ JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
+ JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
+ aScrolledCanvas.getViewport().setBackground (Color.RED);
// Split pane for tree view and canvas.
- JSplitPane aViewSplitPane = new JSplitPane (JSplitPane.HORIZONTAL_SPLIT,
- aTreeScrollPane, maCanvas);
+ JSplitPane aViewSplitPane = new JSplitPane (
+ JSplitPane.HORIZONTAL_SPLIT,
+ aTreeScrollPane,
+ aScrolledCanvas
+ );
aViewSplitPane.setOneTouchExpandable(true);
aViewSplitPane.setDividerLocation (aTreeScrollPane.getPreferredSize().width);
@@ -165,7 +165,6 @@ public class AccessibilityWorkBench
addGridElement (aSplitPane, 0,0, 2,1, 3,3,
GridBagConstraints.CENTER, GridBagConstraints.BOTH);
-
// Button bar.
maButtonBar = new JPanel();
GridBagLayout aButtonLayout = new GridBagLayout ();
@@ -184,6 +183,7 @@ public class AccessibilityWorkBench
Options.Instance().Load (msOptionsFileName);
setJMenuBar (CreateMenuBar ());
+ getContentPane().setSize (new Dimension (800,600));
setTitle("Accessibility Workbench " + msVersion);
@@ -252,6 +252,35 @@ public class AccessibilityWorkBench
aFileMenu.add (aItem);
aItem.addActionListener (this);
+ // View menu.
+ JMenu aViewMenu = new JMenu ("View");
+ maMenuBar.add (aViewMenu);
+ ButtonGroup aGroup = new ButtonGroup ();
+ JRadioButtonMenuItem aRadioButton = new JRadioButtonMenuItem ("Whole Screen");
+ aGroup.add (aRadioButton);
+ aViewMenu.add (aRadioButton);
+ aRadioButton.addActionListener (this);
+ aRadioButton = new JRadioButtonMenuItem ("200%");
+ aGroup.add (aRadioButton);
+ aViewMenu.add (aRadioButton);
+ aRadioButton.addActionListener (this);
+ aRadioButton = new JRadioButtonMenuItem ("100%");
+ aGroup.add (aRadioButton);
+ aViewMenu.add (aRadioButton);
+ aRadioButton.addActionListener (this);
+ aRadioButton = new JRadioButtonMenuItem ("50%");
+ aGroup.add (aRadioButton);
+ aViewMenu.add (aRadioButton);
+ aRadioButton.addActionListener (this);
+ aRadioButton = new JRadioButtonMenuItem ("25%");
+ aGroup.add (aRadioButton);
+ aViewMenu.add (aRadioButton);
+ aRadioButton.addActionListener (this);
+ aRadioButton = new JRadioButtonMenuItem ("10%");
+ aGroup.add (aRadioButton);
+ aViewMenu.add (aRadioButton);
+ aRadioButton.addActionListener (this);
+
// Options menu.
JMenu aOptionsMenu = new JMenu ("Options");
maMenuBar.add (aOptionsMenu);
@@ -424,6 +453,36 @@ public class AccessibilityWorkBench
{
HelpWindow.Instance().loadFile ("about.html");
}
+ else if (e.getActionCommand().equals ("Whole Screen"))
+ {
+ maCanvas.setZoomMode (Canvas.WHOLE_SCREEN);
+ Options.Instance().Save (msOptionsFileName);
+ }
+ else if (e.getActionCommand().equals ("200%"))
+ {
+ maCanvas.setZoomMode (200);
+ Options.Instance().Save (msOptionsFileName);
+ }
+ else if (e.getActionCommand().equals ("100%"))
+ {
+ maCanvas.setZoomMode (100);
+ Options.Instance().Save (msOptionsFileName);
+ }
+ else if (e.getActionCommand().equals ("50%"))
+ {
+ maCanvas.setZoomMode (50);
+ Options.Instance().Save (msOptionsFileName);
+ }
+ else if (e.getActionCommand().equals ("25%"))
+ {
+ maCanvas.setZoomMode (25);
+ Options.Instance().Save (msOptionsFileName);
+ }
+ else if (e.getActionCommand().equals ("10%"))
+ {
+ maCanvas.setZoomMode (10);
+ Options.Instance().Save (msOptionsFileName);
+ }
else
{
System.err.println("unknown command " + e.getActionCommand());
diff --git a/toolkit/test/accessibility/AccessibleActionHandler.java b/toolkit/test/accessibility/AccessibleActionHandler.java
index da6a1a3a2542..0aac7158efde 100644
--- a/toolkit/test/accessibility/AccessibleActionHandler.java
+++ b/toolkit/test/accessibility/AccessibleActionHandler.java
@@ -1,7 +1,7 @@
import com.sun.star.uno.UnoRuntime;
-import drafts.com.sun.star.accessibility.XAccessibleContext;
-import drafts.com.sun.star.accessibility.XAccessibleAction;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.accessibility.XAccessibleAction;
import com.sun.star.lang.IndexOutOfBoundsException;
class AccessibleActionHandler
diff --git a/toolkit/test/accessibility/AccessibleActionNode.java b/toolkit/test/accessibility/AccessibleActionNode.java
index 9f5ed1742167..7c72ac69803e 100644
--- a/toolkit/test/accessibility/AccessibleActionNode.java
+++ b/toolkit/test/accessibility/AccessibleActionNode.java
@@ -1,5 +1,5 @@
import javax.swing.JOptionPane;
-import drafts.com.sun.star.accessibility.XAccessibleAction;
+import com.sun.star.accessibility.XAccessibleAction;
/**
Base class for all tree nodes.
diff --git a/toolkit/test/accessibility/AccessibleCellHandler.java b/toolkit/test/accessibility/AccessibleCellHandler.java
index 4949f7a33cef..19b4a9df67ad 100644
--- a/toolkit/test/accessibility/AccessibleCellHandler.java
+++ b/toolkit/test/accessibility/AccessibleCellHandler.java
@@ -1,8 +1,8 @@
import com.sun.star.uno.UnoRuntime;
-import drafts.com.sun.star.accessibility.XAccessibleContext;
-import drafts.com.sun.star.accessibility.XAccessibleTable;
-import drafts.com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.accessibility.XAccessibleTable;
+import com.sun.star.accessibility.XAccessible;
class AccessibleCellHandler extends NodeHandler
diff --git a/toolkit/test/accessibility/AccessibleComponentHandler.java b/toolkit/test/accessibility/AccessibleComponentHandler.java
index 877c99ec90c5..38e5545d23aa 100644
--- a/toolkit/test/accessibility/AccessibleComponentHandler.java
+++ b/toolkit/test/accessibility/AccessibleComponentHandler.java
@@ -1,7 +1,7 @@
import com.sun.star.uno.UnoRuntime;
-import drafts.com.sun.star.accessibility.XAccessibleContext;
-import drafts.com.sun.star.accessibility.XAccessibleComponent;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.accessibility.XAccessibleComponent;
class AccessibleComponentHandler
diff --git a/toolkit/test/accessibility/AccessibleContextHandler.java b/toolkit/test/accessibility/AccessibleContextHandler.java
index 7df9713118da..b4a51057df69 100644
--- a/toolkit/test/accessibility/AccessibleContextHandler.java
+++ b/toolkit/test/accessibility/AccessibleContextHandler.java
@@ -1,6 +1,6 @@
-import drafts.com.sun.star.accessibility.XAccessible;
-import drafts.com.sun.star.accessibility.XAccessibleContext;
-import drafts.com.sun.star.accessibility.XAccessibleStateSet;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.accessibility.XAccessibleStateSet;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.container.XIndexAccess;
import java.util.HashMap;
diff --git a/toolkit/test/accessibility/AccessibleEditableTextHandler.java b/toolkit/test/accessibility/AccessibleEditableTextHandler.java
index c1c571435219..a79158c099ba 100644
--- a/toolkit/test/accessibility/AccessibleEditableTextHandler.java
+++ b/toolkit/test/accessibility/AccessibleEditableTextHandler.java
@@ -1,7 +1,7 @@
import com.sun.star.uno.UnoRuntime;
-import drafts.com.sun.star.accessibility.XAccessibleContext;
-import drafts.com.sun.star.accessibility.XAccessibleEditableText;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.accessibility.XAccessibleEditableText;
class AccessibleEditableTextHandler extends NodeHandler
diff --git a/toolkit/test/accessibility/AccessibleExtendedComponentHandler.java b/toolkit/test/accessibility/AccessibleExtendedComponentHandler.java
index 968b9d731bc8..7f9fc17b23a5 100644
--- a/toolkit/test/accessibility/AccessibleExtendedComponentHandler.java
+++ b/toolkit/test/accessibility/AccessibleExtendedComponentHandler.java
@@ -1,6 +1,6 @@
import com.sun.star.uno.UnoRuntime;
-import drafts.com.sun.star.accessibility.XAccessibleContext;
-import drafts.com.sun.star.accessibility.XAccessibleExtendedComponent;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.accessibility.XAccessibleExtendedComponent;
class AccessibleExtendedComponentHandler
diff --git a/toolkit/test/accessibility/AccessibleHyperlinkHandler.java b/toolkit/test/accessibility/AccessibleHyperlinkHandler.java
index cc7381b78fa3..674331317f7e 100644
--- a/toolkit/test/accessibility/AccessibleHyperlinkHandler.java
+++ b/toolkit/test/accessibility/AccessibleHyperlinkHandler.java
@@ -1,7 +1,7 @@
import com.sun.star.uno.UnoRuntime;
-import drafts.com.sun.star.accessibility.XAccessibleContext;
-import drafts.com.sun.star.accessibility.XAccessibleHyperlink;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.accessibility.XAccessibleHyperlink;
class AccessibleHyperlinkHandler extends AccessibleTreeHandler
diff --git a/toolkit/test/accessibility/AccessibleHypertextHandler.java b/toolkit/test/accessibility/AccessibleHypertextHandler.java
index 1742ed3a8d9d..aa703942bc4c 100644
--- a/toolkit/test/accessibility/AccessibleHypertextHandler.java
+++ b/toolkit/test/accessibility/AccessibleHypertextHandler.java
@@ -1,7 +1,7 @@
import com.sun.star.uno.UnoRuntime;
-import drafts.com.sun.star.accessibility.XAccessibleContext;
-import drafts.com.sun.star.accessibility.XAccessibleHypertext;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.accessibility.XAccessibleHypertext;
class AccessibleHypertextHandler extends AccessibleTreeHandler
diff --git a/toolkit/test/accessibility/AccessibleImageHandler.java b/toolkit/test/accessibility/AccessibleImageHandler.java
index db2419dfb09f..92917e1b9740 100644
--- a/toolkit/test/accessibility/AccessibleImageHandler.java
+++ b/toolkit/test/accessibility/AccessibleImageHandler.java
@@ -1,7 +1,7 @@
import com.sun.star.uno.UnoRuntime;
-import drafts.com.sun.star.accessibility.XAccessibleContext;
-import drafts.com.sun.star.accessibility.XAccessibleImage;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.accessibility.XAccessibleImage;
class AccessibleImageHandler extends NodeHandler
diff --git a/toolkit/test/accessibility/AccessibleRelationHandler.java b/toolkit/test/accessibility/AccessibleRelationHandler.java
index ca6bdea6caab..1db63afd538b 100644
--- a/toolkit/test/accessibility/AccessibleRelationHandler.java
+++ b/toolkit/test/accessibility/AccessibleRelationHandler.java
@@ -1,10 +1,9 @@
-
import com.sun.star.uno.UnoRuntime;
-import drafts.com.sun.star.accessibility.XAccessible;
-import drafts.com.sun.star.accessibility.XAccessibleContext;
-import drafts.com.sun.star.accessibility.AccessibleRelation;
-import drafts.com.sun.star.accessibility.XAccessibleRelationSet;
-import drafts.com.sun.star.accessibility.AccessibleRelationType;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.accessibility.AccessibleRelation;
+import com.sun.star.accessibility.XAccessibleRelationSet;
+import com.sun.star.accessibility.AccessibleRelationType;
import com.sun.star.lang.IndexOutOfBoundsException;
@@ -58,45 +57,7 @@ class AccessibleRelationHandler
AccessibleRelation aRelation = xRelation.getRelation( i );
StringBuffer aBuffer = new StringBuffer();
- switch( aRelation.RelationType )
- {
- case AccessibleRelationType.INVALID:
- aBuffer.append( "INVALID" );
- break;
- case AccessibleRelationType.CONTROLLED_BY:
- aBuffer.append( "CONTROLLED_BY" );
- break;
- case AccessibleRelationType.CONTROLLED_BY_PROPERTY:
- aBuffer.append( "CONTROLLED_BY_PROPERTY" );
- break;
- case AccessibleRelationType.CONTROLLER_FOR:
- aBuffer.append( "CONTROLLER_FOR" );
- break;
- case AccessibleRelationType.CONTROLLER_FOR_PROPERTY:
- aBuffer.append( "CONTROLLER_FOR_PROPERTY" );
- break;
- case AccessibleRelationType.LABEL_FOR:
- aBuffer.append( "LABEL_FOR" );
- break;
- case AccessibleRelationType.LABEL_FOR_PROPERTY:
- aBuffer.append( "LABEL_FOR_PROPERTY" );
- break;
- case AccessibleRelationType.LABELED_BY:
- aBuffer.append( "LABELED_BY" );
- break;
- case AccessibleRelationType.LABELED_BY_PROPERTY:
- aBuffer.append( "LABELED_BY_PROPERTY" );
- break;
- case AccessibleRelationType.MEMBER_OF:
- aBuffer.append( "MEMBER_OF" );
- break;
- case AccessibleRelationType.MEMBER_OF_PROPERTY:
- aBuffer.append( "MEMBER_OF_PROPERTY" );
- break;
- default:
- aBuffer.append( aRelation.RelationType );
- break;
- }
+ aBuffer.append (NameProvider.getRelationName (aRelation.RelationType));
aBuffer.append( ": " );
for( int j = 0; j < aRelation.TargetSet.length; j++ )
diff --git a/toolkit/test/accessibility/AccessibleSelectionHandler.java b/toolkit/test/accessibility/AccessibleSelectionHandler.java
index bfd3900cb781..f7ab62807332 100644
--- a/toolkit/test/accessibility/AccessibleSelectionHandler.java
+++ b/toolkit/test/accessibility/AccessibleSelectionHandler.java
@@ -1,8 +1,8 @@
import com.sun.star.uno.UnoRuntime;
-import drafts.com.sun.star.accessibility.XAccessible;
-import drafts.com.sun.star.accessibility.XAccessibleContext;
-import drafts.com.sun.star.accessibility.XAccessibleSelection;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.accessibility.XAccessibleSelection;
import com.sun.star.lang.IndexOutOfBoundsException;
import javax.swing.*;
diff --git a/toolkit/test/accessibility/AccessibleTableHandler.java b/toolkit/test/accessibility/AccessibleTableHandler.java
index 84e754dde8b0..c3883f649d5e 100644
--- a/toolkit/test/accessibility/AccessibleTableHandler.java
+++ b/toolkit/test/accessibility/AccessibleTableHandler.java
@@ -1,7 +1,7 @@
import com.sun.star.uno.UnoRuntime;
-import drafts.com.sun.star.accessibility.XAccessibleContext;
-import drafts.com.sun.star.accessibility.XAccessibleTable;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.accessibility.XAccessibleTable;
class AccessibleTableHandler extends NodeHandler
diff --git a/toolkit/test/accessibility/AccessibleTextHandler.java b/toolkit/test/accessibility/AccessibleTextHandler.java
index 3d5256b2cb51..52b2ec53c52e 100644
--- a/toolkit/test/accessibility/AccessibleTextHandler.java
+++ b/toolkit/test/accessibility/AccessibleTextHandler.java
@@ -1,8 +1,8 @@
-import drafts.com.sun.star.accessibility.XAccessibleContext;
-import drafts.com.sun.star.accessibility.XAccessibleText;
-import drafts.com.sun.star.accessibility.XAccessibleEditableText;
-import drafts.com.sun.star.accessibility.AccessibleTextType;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.accessibility.XAccessibleText;
+import com.sun.star.accessibility.XAccessibleEditableText;
+import com.sun.star.accessibility.AccessibleTextType;
import com.sun.star.awt.Rectangle;
import com.sun.star.awt.Point;
@@ -205,6 +205,10 @@ class AccessibleTextHandler extends NodeHandler
{
aNode.addChild (new StringNode (e.toString(), aNode));
}
+ catch (com.sun.star.lang.IllegalArgumentException e)
+ {
+ aNode.addChild (new StringNode (e.toString(), aNode));
+ }
}
return aNode;
@@ -287,6 +291,23 @@ class AccessibleTextHandler extends NodeHandler
private AccessibleTreeNode getAttributes( XAccessibleText xText,
AccessibleTreeNode aParent)
{
+ String[] aAttributeList = new String[] {
+ "CharBackColor",
+ "CharColor",
+ "CharEscapement",
+ "CharHeight",
+ "CharPosture",
+ "CharStrikeout",
+ "CharUnderline",
+ "CharWeight",
+ "ParaAdjust",
+ "ParaBottomMargin",
+ "ParaFirstLineIndent",
+ "ParaLeftMargin",
+ "ParaLineSpacing",
+ "ParaRightMargin",
+ "ParaTabStops"};
+
AccessibleTreeNode aRet;
try
@@ -298,11 +319,19 @@ class AccessibleTextHandler extends NodeHandler
while( nIndex < nLength )
{
// get attribute run
- String aPortion = xText.getTextAtIndex(
- nIndex, (short)6/*AccessibleTextType.ATTRIBUTE*/ );
+ String aPortion = null;
+ try
+ {
+ aPortion = xText.getTextAtIndex(
+ nIndex, AccessibleTextType.ATTRIBUTE_RUN);
+ }
+ catch(com.sun.star.lang.IllegalArgumentException e)
+ {
+ aPortion = new String ("");
+ }
// get attributes and make node with attribute children
- PropertyValue[] aValues = xText.getCharacterAttributes(nIndex);
+ PropertyValue[] aValues = xText.getCharacterAttributes(nIndex, aAttributeList);
VectorNode aAttrs = new VectorNode (aPortion, aPortions);
for( int i = 0; i < aValues.length; i++ )
{
diff --git a/toolkit/test/accessibility/AccessibleTreeHandler.java b/toolkit/test/accessibility/AccessibleTreeHandler.java
index 3e8fc0429c90..f45db8cb5ab9 100644
--- a/toolkit/test/accessibility/AccessibleTreeHandler.java
+++ b/toolkit/test/accessibility/AccessibleTreeHandler.java
@@ -1,5 +1,5 @@
-import drafts.com.sun.star.accessibility.XAccessible;
-import drafts.com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.XAccessibleContext;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.lang.IndexOutOfBoundsException;
diff --git a/toolkit/test/accessibility/AccessibleUNOHandler.java b/toolkit/test/accessibility/AccessibleUNOHandler.java
index 1e1ba1b9b9c5..d52e60cd721f 100644
--- a/toolkit/test/accessibility/AccessibleUNOHandler.java
+++ b/toolkit/test/accessibility/AccessibleUNOHandler.java
@@ -1,9 +1,9 @@
import com.sun.star.uno.UnoRuntime;
-import drafts.com.sun.star.accessibility.XAccessible;
-import drafts.com.sun.star.accessibility.XAccessibleContext;
-import drafts.com.sun.star.accessibility.AccessibleRelation;
-import drafts.com.sun.star.accessibility.XAccessibleRelationSet;
-import drafts.com.sun.star.accessibility.AccessibleRelationType;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.accessibility.AccessibleRelation;
+import com.sun.star.accessibility.XAccessibleRelationSet;
+import com.sun.star.accessibility.AccessibleRelationType;
import com.sun.star.lang.XServiceInfo;
import com.sun.star.lang.XTypeProvider;
import com.sun.star.uno.Type;
diff --git a/toolkit/test/accessibility/Canvas.java b/toolkit/test/accessibility/Canvas.java
index 5112d11d6295..a1d8fb0f7d08 100755
--- a/toolkit/test/accessibility/Canvas.java
+++ b/toolkit/test/accessibility/Canvas.java
@@ -7,9 +7,9 @@ import javax.swing.event.TreeSelectionListener;
import javax.swing.event.TreeSelectionEvent;
import java.awt.geom.Rectangle2D;
-import drafts.com.sun.star.accessibility.XAccessible;
-import drafts.com.sun.star.accessibility.XAccessibleContext;
-import drafts.com.sun.star.accessibility.XAccessibleComponent;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.accessibility.XAccessibleComponent;
/** This canvas displays accessible objects graphically. Each accessible
object with graphical representation is represented by an
@@ -21,8 +21,11 @@ import drafts.com.sun.star.accessibility.XAccessibleComponent;
*/
class Canvas
extends JPanel
- implements MouseListener, MouseMotionListener, TreeSelectionListener
+ implements MouseListener, MouseMotionListener, TreeSelectionListener//, Scrollable
{
+ // This constant can be passed to SetZoomMode to always show the whole screen.
+ public static final int WHOLE_SCREEN = -1;
+
public Canvas ()
{
super (true);
@@ -41,6 +44,7 @@ class Canvas
setShowDescriptions (true);
setShowNames (true);
setAntialiasing (true);
+ maLastWidgetSize = new Dimension (0,0);
}
/** Tell the canvas which tree view to use to highlight accessible
@@ -136,14 +140,12 @@ class Canvas
public boolean getShowNames ()
{
- System.out.println ("show names is " + Options.GetBoolean ("ShowNames"));
return Options.GetBoolean ("ShowNames");
}
public void setShowNames (boolean bNewValue)
{
Options.SetBoolean ("ShowNames", bNewValue);
- System.out.println ("show names is " + Options.GetBoolean ("ShowNames") + bNewValue);
repaint ();
}
@@ -169,6 +171,18 @@ class Canvas
repaint ();
}
+ public void setZoomMode (int nZoomMode)
+ {
+ Options.SetInteger ("ZoomMode", nZoomMode);
+ repaint ();
+ }
+
+ public int getZoomMode ()
+ {
+ return Options.GetInteger ("ZoomMode", WHOLE_SCREEN);
+ }
+
+
public void paintComponent (Graphics g)
{
synchronized (g)
@@ -189,8 +203,8 @@ class Canvas
// accessible object on the screen.
Dimension aScreenSize = Toolkit.getDefaultToolkit().getScreenSize();
Rectangle2D.Double aScreen = new Rectangle2D.Double (
- mnHOffset * mnScale,
- mnVOffset * mnScale,
+ mnHOffset,
+ mnVOffset,
mnScale*aScreenSize.getWidth(),
mnScale*aScreenSize.getHeight());
// Fill the screen rectangle and draw a frame arround it to increase its visibility.
@@ -231,33 +245,76 @@ class Canvas
*/
private void setupTransformation ()
{
- Dimension aScreenSize = Toolkit.getDefaultToolkit().getScreenSize();
- Dimension aWidgetSize = getSize();
- if ((aScreenSize.getWidth() > 0) && (aScreenSize.getHeight() > 0))
+ // Turn off scrollbars when showing the whole screen. Otherwise show them when needed.
+ JViewport aViewport = (JViewport)getParent();
+ JScrollPane aScrollPane = (JScrollPane)aViewport.getParent();
+ int nZoomMode = getZoomMode();
+ if (nZoomMode == WHOLE_SCREEN)
{
- // 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 axes
- // at the same time.
- double nHScale = (aWidgetSize.getWidth() - 10) / aScreenSize.getWidth();
- double nVScale = (aWidgetSize.getHeight() - 10) / aScreenSize.getHeight();
- if (nHScale < nVScale)
- mnScale = nHScale;
- else
- mnScale = nVScale;
-
- // Calculate offsets that center the scaled screen inside the widget.
- mnHOffset = (aWidgetSize.getWidth() - mnScale*aScreenSize.getWidth()) / 2.0;
- mnVOffset = (aWidgetSize.getHeight() - mnScale*aScreenSize.getHeight()) / 2.0;
+ if (aScrollPane.getHorizontalScrollBarPolicy()
+ != JScrollPane.HORIZONTAL_SCROLLBAR_NEVER)
+ aScrollPane.setHorizontalScrollBarPolicy (JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
+ if (aScrollPane.getVerticalScrollBarPolicy()
+ != JScrollPane.VERTICAL_SCROLLBAR_NEVER)
+ aScrollPane.setVerticalScrollBarPolicy (JScrollPane.VERTICAL_SCROLLBAR_NEVER);
}
else
{
- // In case of a degenerate (not yet initialized?) screen size
- // use some meaningless default values.
- mnScale = 1;
- mnHOffset = 0;
- mnVOffset = 0;
+ if (aScrollPane.getHorizontalScrollBarPolicy()
+ != JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED)
+ aScrollPane.setHorizontalScrollBarPolicy (JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
+ if (aScrollPane.getVerticalScrollBarPolicy()
+ != JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED)
+ aScrollPane.setVerticalScrollBarPolicy (JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
+ }
+
+ Dimension aScreenSize = Toolkit.getDefaultToolkit().getScreenSize();
+ Dimension aWidgetSize = aViewport.getSize();
+ {
+ if ((aScreenSize.getWidth() > 0) && (aScreenSize.getHeight() > 0))
+ {
+ if (nZoomMode == WHOLE_SCREEN)
+ {
+ // 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
+ // axes at the same time.
+ double nHScale = (aWidgetSize.getWidth() - 10) / aScreenSize.getWidth();
+ double nVScale = (aWidgetSize.getHeight() - 10) / aScreenSize.getHeight();
+ if (nHScale < nVScale)
+ mnScale = nHScale;
+ else
+ mnScale = nVScale;
+ }
+ else
+ {
+ mnScale = nZoomMode / 100.0;
+ }
+
+ // Calculate offsets that center the scaled screen inside the widget.
+ mnHOffset = (aWidgetSize.getWidth() - mnScale*aScreenSize.getWidth()) / 2.0;
+ 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())));
+ revalidate ();
+ }
+ else
+ {
+ // In case of a degenerate (not yet initialized?) screen size
+ // use some meaningless default values.
+ mnScale = 1;
+ mnHOffset = 0;
+ mnVOffset = 0;
+ }
}
+ maLastWidgetSize = aWidgetSize;
}
@@ -365,7 +422,6 @@ class Canvas
}
}
-
private int
mnXAnchor,
mnYAnchor,
@@ -386,4 +442,7 @@ class Canvas
maBoundingBox;
private JTree
maTree;
+ // The size of the widget at the last call of setupTransformation()
+ private Dimension
+ maLastWidgetSize;
}
diff --git a/toolkit/test/accessibility/CanvasShape.java b/toolkit/test/accessibility/CanvasShape.java
index 30e76cadefdc..57cedebb9e88 100644
--- a/toolkit/test/accessibility/CanvasShape.java
+++ b/toolkit/test/accessibility/CanvasShape.java
@@ -6,13 +6,13 @@ import java.awt.geom.Rectangle2D;
import com.sun.star.beans.XPropertyChangeListener;
import com.sun.star.beans.PropertyChangeEvent;
-import drafts.com.sun.star.accessibility.XAccessible;
-import drafts.com.sun.star.accessibility.XAccessibleContext;
-import drafts.com.sun.star.accessibility.XAccessibleComponent;
-import drafts.com.sun.star.accessibility.XAccessibleExtendedComponent;
-import drafts.com.sun.star.accessibility.XAccessibleText;
-import drafts.com.sun.star.accessibility.XAccessibleStateSet;
-import drafts.com.sun.star.accessibility.AccessibleStateType;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.accessibility.XAccessibleComponent;
+import com.sun.star.accessibility.XAccessibleExtendedComponent;
+import com.sun.star.accessibility.XAccessibleText;
+import com.sun.star.accessibility.XAccessibleStateSet;
+import com.sun.star.accessibility.AccessibleStateType;
class CanvasShape
{
@@ -108,8 +108,8 @@ class CanvasShape
// specified offset and scale.
Point aLocation = new Point();
maShape = new Rectangle2D.Double (
- (maPosition.x + nXOffset) * nScaleFactor,
- (maPosition.y + nYOffset) * nScaleFactor,
+ maPosition.x * nScaleFactor + nXOffset,
+ maPosition.y * nScaleFactor + nYOffset,
maSize.width * nScaleFactor,
maSize.height * nScaleFactor);
diff --git a/toolkit/test/accessibility/ChildEventHandler.java b/toolkit/test/accessibility/ChildEventHandler.java
index 546a75f95fca..b73c90feac6d 100644
--- a/toolkit/test/accessibility/ChildEventHandler.java
+++ b/toolkit/test/accessibility/ChildEventHandler.java
@@ -1,5 +1,5 @@
-import drafts.com.sun.star.accessibility.XAccessible;
-import drafts.com.sun.star.accessibility.AccessibleEventObject;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.AccessibleEventObject;
import com.sun.star.uno.UnoRuntime;
import java.io.PrintStream;
diff --git a/toolkit/test/accessibility/ContextEventHandler.java b/toolkit/test/accessibility/ContextEventHandler.java
index f07f86d5f967..072bb3d8ead1 100644
--- a/toolkit/test/accessibility/ContextEventHandler.java
+++ b/toolkit/test/accessibility/ContextEventHandler.java
@@ -1,6 +1,6 @@
-import drafts.com.sun.star.accessibility.XAccessible;
-import drafts.com.sun.star.accessibility.AccessibleEventObject;
-import drafts.com.sun.star.accessibility.AccessibleEventId;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.AccessibleEventObject;
+import com.sun.star.accessibility.AccessibleEventId;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.AnyConverter;
@@ -18,7 +18,7 @@ class ContextEventHandler
{
switch (mnEventId)
{
- case AccessibleEventId.ACCESSIBLE_STATE_EVENT:
+ case AccessibleEventId.STATE_CHANGED:
try
{
int nOldValue = AnyConverter.toInt (maEvent.OldValue);
diff --git a/toolkit/test/accessibility/EventHandler.java b/toolkit/test/accessibility/EventHandler.java
index 2c9cdc7a352d..320f43dc61e9 100644
--- a/toolkit/test/accessibility/EventHandler.java
+++ b/toolkit/test/accessibility/EventHandler.java
@@ -1,6 +1,6 @@
-import drafts.com.sun.star.accessibility.XAccessible;
-import drafts.com.sun.star.accessibility.XAccessibleContext;
-import drafts.com.sun.star.accessibility.AccessibleEventObject;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.accessibility.AccessibleEventObject;
import com.sun.star.uno.UnoRuntime;
import java.io.PrintStream;
diff --git a/toolkit/test/accessibility/EventListener.java b/toolkit/test/accessibility/EventListener.java
index 9fcb72bdf994..619c7fdd355e 100644
--- a/toolkit/test/accessibility/EventListener.java
+++ b/toolkit/test/accessibility/EventListener.java
@@ -8,7 +8,7 @@ import java.util.Vector;
import java.util.HashMap;
import java.util.Enumeration;
-import drafts.com.sun.star.accessibility.*;
+import com.sun.star.accessibility.*;
import com.sun.star.uno.*;
import com.sun.star.uno.UnoRuntime;
@@ -62,50 +62,45 @@ public class EventListener
switch (aEvent.EventId)
{
- case AccessibleEventId.ACCESSIBLE_CHILD_EVENT:
+ case AccessibleEventId.CHILD:
aHandler = new ChildEventHandler (aEvent, maTreeModel);
break;
- case AccessibleEventId.ACCESSIBLE_BOUNDRECT_EVENT:
- case AccessibleEventId.ACCESSIBLE_VISIBLE_DATA_EVENT:
+ case AccessibleEventId.BOUNDRECT_CHANGED:
+ case AccessibleEventId.VISIBLE_DATA_CHANGED:
aHandler = new GeometryEventHandler (aEvent, maTreeModel);
break;
- case AccessibleEventId.ACCESSIBLE_NAME_EVENT:
- case AccessibleEventId.ACCESSIBLE_DESCRIPTION_EVENT:
- case AccessibleEventId.ACCESSIBLE_STATE_EVENT:
- case AccessibleEventId.CONTROLLED_BY_EVENT:
- case AccessibleEventId.CONTROLLER_FOR_EVENT:
- case AccessibleEventId.LABEL_FOR_EVENT:
- case AccessibleEventId.LABELED_BY_EVENT:
- case AccessibleEventId.MEMBER_OF_EVENT:
- case AccessibleEventId.ACCESSIBLE_SELECTION_EVENT:
+ case AccessibleEventId.NAME_CHANGED:
+ case AccessibleEventId.DESCRIPTION_CHANGED:
+ case AccessibleEventId.STATE_CHANGED:
+ case AccessibleEventId.SELECTION_CHANGED:
aHandler = new ContextEventHandler (aEvent, maTreeModel);
break;
- case AccessibleEventId.ACCESSIBLE_TABLE_MODEL_EVENT:
- case AccessibleEventId.ACCESSIBLE_TABLE_CAPTION_EVENT:
- case AccessibleEventId.ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_EVENT:
- case AccessibleEventId.ACCESSIBLE_TABLE_COLUMN_HEADER_EVENT:
- case AccessibleEventId.ACCESSIBLE_TABLE_ROW_DESCRIPTION_EVENT:
- case AccessibleEventId.ACCESSIBLE_TABLE_ROW_HEADER_EVENT:
- case AccessibleEventId.ACCESSIBLE_TABLE_SUMMARY_EVENT:
+ case AccessibleEventId.TABLE_MODEL_CHANGED:
+ case AccessibleEventId.TABLE_CAPTION_CHANGED:
+ case AccessibleEventId.TABLE_COLUMN_DESCRIPTION_CHANGED:
+ case AccessibleEventId.TABLE_COLUMN_HEADER_CHANGED:
+ case AccessibleEventId.TABLE_ROW_DESCRIPTION_CHANGED:
+ case AccessibleEventId.TABLE_ROW_HEADER_CHANGED:
+ case AccessibleEventId.TABLE_SUMMARY_CHANGED:
aHandler = new TableEventHandler (aEvent, maTreeModel);
break;
- case AccessibleEventId.ACCESSIBLE_ACTION_EVENT:
+ case AccessibleEventId.ACTION_CHANGED:
aHandler = new EventHandler (aEvent, maTreeModel);
break;
- case AccessibleEventId.ACCESSIBLE_HYPERTEXT_EVENT:
+ case AccessibleEventId.HYPERTEXT_CHANGED:
aHandler = new EventHandler (aEvent, maTreeModel);
break;
- case AccessibleEventId.ACCESSIBLE_ACTIVE_DESCENDANT_EVENT:
- case AccessibleEventId.ACCESSIBLE_CARET_EVENT:
- case AccessibleEventId.ACCESSIBLE_TEXT_EVENT:
- case AccessibleEventId.ACCESSIBLE_VALUE_EVENT:
+ case AccessibleEventId.ACTIVE_DESCENDANT_CHANGED:
+ case AccessibleEventId.CARET_CHANGED:
+ case AccessibleEventId.TEXT_CHANGED:
+ case AccessibleEventId.VALUE_CHANGED:
aHandler = new EventHandler (aEvent, maTreeModel);
break;
diff --git a/toolkit/test/accessibility/EventQueue.java b/toolkit/test/accessibility/EventQueue.java
index 2d9fc4b5c828..9c90af9c63b7 100644
--- a/toolkit/test/accessibility/EventQueue.java
+++ b/toolkit/test/accessibility/EventQueue.java
@@ -1,4 +1,4 @@
-import drafts.com.sun.star.accessibility.*;
+import com.sun.star.accessibility.*;
import com.sun.star.lang.EventObject;
import java.util.LinkedList;
diff --git a/toolkit/test/accessibility/GeometryEventHandler.java b/toolkit/test/accessibility/GeometryEventHandler.java
index d34f3c0f6c01..07236785e862 100644
--- a/toolkit/test/accessibility/GeometryEventHandler.java
+++ b/toolkit/test/accessibility/GeometryEventHandler.java
@@ -1,5 +1,5 @@
-import drafts.com.sun.star.accessibility.XAccessible;
-import drafts.com.sun.star.accessibility.AccessibleEventObject;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.AccessibleEventObject;
import com.sun.star.uno.UnoRuntime;
import java.io.PrintStream;
diff --git a/toolkit/test/accessibility/InformationWriter.java b/toolkit/test/accessibility/InformationWriter.java
index 444655db2eb9..e119d2037350 100755
--- a/toolkit/test/accessibility/InformationWriter.java
+++ b/toolkit/test/accessibility/InformationWriter.java
@@ -36,11 +36,11 @@ import com.sun.star.drawing.XShapes;
import com.sun.star.drawing.XShape;
import com.sun.star.drawing.XShapeDescriptor;
-import drafts.com.sun.star.accessibility.XAccessible;
-import drafts.com.sun.star.accessibility.XAccessibleContext;
-import drafts.com.sun.star.accessibility.XAccessibleComponent;
-import drafts.com.sun.star.accessibility.XAccessibleRelationSet;
-import drafts.com.sun.star.accessibility.XAccessibleStateSet;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.accessibility.XAccessibleComponent;
+import com.sun.star.accessibility.XAccessibleRelationSet;
+import com.sun.star.accessibility.XAccessibleStateSet;
public class InformationWriter
{
diff --git a/toolkit/test/accessibility/NodeFactory.java b/toolkit/test/accessibility/NodeFactory.java
index 3e0667da7282..8fb5b8710bc8 100644
--- a/toolkit/test/accessibility/NodeFactory.java
+++ b/toolkit/test/accessibility/NodeFactory.java
@@ -1,4 +1,4 @@
-import drafts.com.sun.star.accessibility.*;
+import com.sun.star.accessibility.*;
import java.util.Vector;
/** This singleton class creates nodes for given accessible objects.
diff --git a/toolkit/test/accessibility/NodeHandler.java b/toolkit/test/accessibility/NodeHandler.java
index 0de70e62adaf..b39741b1f398 100644
--- a/toolkit/test/accessibility/NodeHandler.java
+++ b/toolkit/test/accessibility/NodeHandler.java
@@ -12,7 +12,7 @@ abstract class NodeHandler
public abstract NodeHandler createHandler (
- drafts.com.sun.star.accessibility.XAccessibleContext xContext);
+ com.sun.star.accessibility.XAccessibleContext xContext);
public NodeHandler ()
{
diff --git a/toolkit/test/accessibility/NodeMap.java b/toolkit/test/accessibility/NodeMap.java
index f32cfd5d4301..43479278aec4 100644
--- a/toolkit/test/accessibility/NodeMap.java
+++ b/toolkit/test/accessibility/NodeMap.java
@@ -1,4 +1,4 @@
-import drafts.com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.accessibility.XAccessibleContext;
import java.util.HashMap;
diff --git a/toolkit/test/accessibility/Options.java b/toolkit/test/accessibility/Options.java
index a9c31aba5ab2..9b0f6f01889c 100644
--- a/toolkit/test/accessibility/Options.java
+++ b/toolkit/test/accessibility/Options.java
@@ -29,17 +29,27 @@ class Options
static public void SetBoolean (String sName, boolean bValue)
{
Instance().setProperty (sName, Boolean.toString(bValue));
- System.out.println ("setting boolean " + sName + " : "
- + Instance().getProperty (sName));
}
static public boolean GetBoolean (String sName)
{
- System.out.println ("getting boolean " + sName + " : "
- + Instance().getProperty (sName) + "->" + Boolean.getBoolean(Instance().getProperty (sName)));
return Boolean.getBoolean(Instance().getProperty (sName));
}
+ static public void SetInteger (String sName, int nValue)
+ {
+ Instance().setProperty (sName, Integer.toString(nValue));
+ }
+
+ static public int GetInteger (String sName, int nDefault)
+ {
+ String sValue = Instance().getProperty (sName);
+ if (sValue == null)
+ return nDefault;
+ else
+ return Integer.parseInt (sValue);
+ }
+
public void Load (String sBaseName)
{
try
diff --git a/toolkit/test/accessibility/QueuedListener.java b/toolkit/test/accessibility/QueuedListener.java
index 580cce046460..b92d7ac487e6 100644
--- a/toolkit/test/accessibility/QueuedListener.java
+++ b/toolkit/test/accessibility/QueuedListener.java
@@ -1,7 +1,7 @@
-import drafts.com.sun.star.accessibility.*;
+import com.sun.star.accessibility.*;
import com.sun.star.lang.EventObject;
import com.sun.star.uno.*;
-import drafts.com.sun.star.accessibility.*;
+import com.sun.star.accessibility.*;
import java.util.LinkedList;
diff --git a/toolkit/test/accessibility/SelectionDialog.java b/toolkit/test/accessibility/SelectionDialog.java
index 1c5ad3dbc8c1..732506a7e14b 100644
--- a/toolkit/test/accessibility/SelectionDialog.java
+++ b/toolkit/test/accessibility/SelectionDialog.java
@@ -1,7 +1,7 @@
import com.sun.star.uno.UnoRuntime;
-import drafts.com.sun.star.accessibility.XAccessible;
-import drafts.com.sun.star.accessibility.XAccessibleContext;
-import drafts.com.sun.star.accessibility.XAccessibleSelection;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.accessibility.XAccessibleSelection;
import com.sun.star.lang.IndexOutOfBoundsException;
import javax.swing.*;
@@ -133,7 +133,7 @@ class SelectionDialog extends JDialog
{
try
{
- mxSelection.deselectSelectedAccessibleChild(
+ mxSelection.deselectAccessibleChild(
maChildrenSelector.getSelectedIndex());
}
catch( IndexOutOfBoundsException e )
diff --git a/toolkit/test/accessibility/SimpleOffice.java b/toolkit/test/accessibility/SimpleOffice.java
index fc0204bc225e..4417267675af 100755
--- a/toolkit/test/accessibility/SimpleOffice.java
+++ b/toolkit/test/accessibility/SimpleOffice.java
@@ -35,13 +35,13 @@ import com.sun.star.drawing.XShapes;
import com.sun.star.drawing.XShape;
import com.sun.star.drawing.XShapeDescriptor;
-import drafts.com.sun.star.accessibility.XAccessible;
-import drafts.com.sun.star.accessibility.XAccessibleContext;
-import drafts.com.sun.star.accessibility.XAccessibleComponent;
-import drafts.com.sun.star.accessibility.XAccessibleRelationSet;
-import drafts.com.sun.star.accessibility.XAccessibleStateSet;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.accessibility.XAccessibleComponent;
+import com.sun.star.accessibility.XAccessibleRelationSet;
+import com.sun.star.accessibility.XAccessibleStateSet;
-import drafts.com.sun.star.awt.XExtendedToolkit;
+import com.sun.star.awt.XExtendedToolkit;
/** This class tries to simplify some tasks like loading a document or
diff --git a/toolkit/test/accessibility/TableEventHandler.java b/toolkit/test/accessibility/TableEventHandler.java
index c1a6b0b7265b..7655d3a13599 100644
--- a/toolkit/test/accessibility/TableEventHandler.java
+++ b/toolkit/test/accessibility/TableEventHandler.java
@@ -1,7 +1,7 @@
-import drafts.com.sun.star.accessibility.XAccessible;
-import drafts.com.sun.star.accessibility.AccessibleEventObject;
-import drafts.com.sun.star.accessibility.AccessibleEventId;
-import drafts.com.sun.star.accessibility.AccessibleTableModelChange;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.AccessibleEventObject;
+import com.sun.star.accessibility.AccessibleEventId;
+import com.sun.star.accessibility.AccessibleTableModelChange;
import com.sun.star.uno.UnoRuntime;
import java.io.PrintStream;
@@ -18,7 +18,7 @@ class TableEventHandler
{
switch (mnEventId)
{
- case AccessibleEventId.ACCESSIBLE_TABLE_MODEL_EVENT:
+ case AccessibleEventId.TABLE_MODEL_CHANGED:
AccessibleTableModelChange aModelChange =
(AccessibleTableModelChange)maEvent.NewValue;
out.println( "Range: StartRow " + aModelChange.FirstRow +
diff --git a/toolkit/test/accessibility/TextUpdateListener.java b/toolkit/test/accessibility/TextUpdateListener.java
index 02a0e7f0b16e..0ce990144c67 100644
--- a/toolkit/test/accessibility/TextUpdateListener.java
+++ b/toolkit/test/accessibility/TextUpdateListener.java
@@ -1,4 +1,4 @@
-import drafts.com.sun.star.accessibility.*;
+import com.sun.star.accessibility.*;
import com.sun.star.uno.UnoRuntime;
import javax.swing.tree.*;
diff --git a/toolkit/test/accessibility/TopWindowListener.java b/toolkit/test/accessibility/TopWindowListener.java
index d9dfae58b874..60ab4cd3faa6 100644
--- a/toolkit/test/accessibility/TopWindowListener.java
+++ b/toolkit/test/accessibility/TopWindowListener.java
@@ -1,7 +1,7 @@
import com.sun.star.awt.XWindow;
-import drafts.com.sun.star.awt.XExtendedToolkit;
-import drafts.com.sun.star.accessibility.XAccessible;
-import drafts.com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.awt.XExtendedToolkit;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.XAccessibleContext;
import com.sun.star.uno.XInterface;
import com.sun.star.uno.UnoRuntime;
import javax.swing.event.TreeModelEvent;
@@ -30,6 +30,7 @@ class TopWindowListener
{
maModel.lock ();
int nTopWindowCount = xToolkit.getTopWindowCount();
+ MessageArea.println ("There are " + nTopWindowCount + " top windows.");
for (int i=0; i<nTopWindowCount; i++)
{
try
diff --git a/toolkit/test/accessibility/news.html b/toolkit/test/accessibility/news.html
index bfef78a5f841..192735bc71fe 100644
--- a/toolkit/test/accessibility/news.html
+++ b/toolkit/test/accessibility/news.html
@@ -16,6 +16,8 @@ main widgets.</li>
<li>Removed the "Load" button.</li>
<li>Removed the status line.</li>
<li>The tree view shows top level nodes only for document windows.</li>
+<li>New "views" menu that allows you to select the zoom scale of the
+ graphical view.</li>
</ul>