summaryrefslogtreecommitdiff
path: root/accessibility/bridge/org
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-23 15:06:19 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-23 15:06:19 +0200
commitcdda6341027eb807f9cdeca704011fe3968fe3e3 (patch)
treefd07b7561c849218420a898a9fd853bcc6121332 /accessibility/bridge/org
parentb52ec9a4fa9b8eb93a181fac3613f1de7d1d0825 (diff)
recreated tag libreoffice-3.3.1.1 which had these commits:
commit 0038bc6128921ad380912b18634212681578abfd (tag: refs/tags/libreoffice-3.3.1.1) Author: Petr Mladek <pmladek@suse.cz> Date: Tue Feb 8 18:07:42 2011 +0100 Version 3.3.1.1, tag libreoffice-3.3.1.1 (3.3.1-rc1) commit d7771bc638587e49ea7225312933c73cfc041439 Author: bjoern.michaelsen@canonical.com <Bjoern Michaelsen> Date: Mon Feb 7 17:18:01 2011 +0100 lp#696527: enable human icon theme in LibreOffice (cherry picked from commit cfa7e88f5959a8b3b729107d61351410be80f49b) Signed-off-by: Thorsten Behrens <tbehrens@novell.com> (cherry picked from commit c1d45fdb7f6380a0e6640a336cd790027e903b4f) Signed-off-by: Cedric Bosdonnat <cedric.bosdonnat.ooo@free.fr> Signed-off-by: Petr Mladek <pmladek@suse.cz> cui/source/options/optgdlg.src | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 474fbc4e896114f138061af9002b88cd675c8f01 Author: Jan Holesovsky <kendy@suse.cz> Date: Mon Feb 7 21:23:23 2011 +0100 Branch libreoffice-3-3-1 This is 'libreoffice-3-3-1' - the stable branch for the 3.3.1 release. Only very safe changes, reviewed by three people are allowed. If you want to commit more complicated fix for the next 3.3.x release, please use the 'libreoffice-3-3' branch. If you want to build something cool, unstable, and risky, use master. commit 94a2ea07194893531b93b78c2903d96bbc5526ce Author: Petr Mladek <pmladek@suse.cz> Date: Sun Feb 6 18:22:35 2011 +0100 add Ukrainian also into packinfo_office.txt setup_native/source/packinfo/packinfo_office.txt | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-) commit e6e8d8ebbe2ef54704a467cf4930494fdf3be6ff Author: Petr Mladek <pmladek@suse.cz> Date: Sun Feb 6 18:06:37 2011 +0100 add Occitan also into packinfo_office.txt build fails witout it setup_native/source/packinfo/packinfo_office.txt | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) commit 7754d67735a8e698d2b7106cae4c6e35eaf3b75b Author: Thorsten Behrens <tbehrens@novell.com> Date: Thu Feb 3 17:28:59 2011 +0100 New mimetype icons for LibreOffice Update from design team, source svg is http://wiki.documentfoundation.org/cgi_img_auth.php/d/d4/LibreOffice_Initial_Icons-pre_final.svg setup_native/source/win32/nsis/ooosetup.ico | Bin 2238 -> 26918 bytes 1 files changed, 0 insertions(+), 0 deletions(-) commit adbc618d68569d5b63d1ec87c5d7a9d7f5ba5761 Author: Caolán McNamara <caolanm@redhat.com> Date: Sun Jan 30 20:38:00 2011 +0000 Resolves: rhbz#673819 crash on changing position of drawing object in header The header/footer objects are cunning wrappers to pretend to some parts of the drawing stuff that there are multiple objects, while in reality there is only one. So call HasText actually gets a totally different object from the cast :-( Signed-off-by: David Tardon <dtardon@redhat.com> cui/source/tabpages/swpossizetabpage.cxx | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) commit 13519789cd6c9f86067251c5566f29a96bdaac44 Author: Rene Engelhard <rene@debian.org> Date: Thu Feb 3 00:37:15 2011 +0100 another s/OpenOffice.org/LibreOffice/ in nsplugin extensions/source/nsplugin/source/nsplugin_oo.rc | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit c0c2964c3ad1a42a5cd3548b9fcdd1c256c077bf Author: Andras Timar <timar@fsf.hu> Date: Sat Jan 29 12:32:52 2011 +0100 Added Occitan dictionary .../source/packinfo/spellchecker_selection.txt | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit eacd19b0e2eeba91aa1b2387d93e99996c0efae2 Author: Andras Timar <timar@fsf.hu> Date: Sat Jan 29 11:14:10 2011 +0100 Added Ukrainian dictionaries .../source/packinfo/spellchecker_selection.txt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit ecf859006048314ef1c4a4202a642e74a443ebce Author: Tor Lillqvist <tlillqvist@novell.com> Date: Tue Feb 1 14:26:46 2011 +0200 Fix overflow problem in the custom action for UI language de-selection In the _all_ installer we have slightly over 100 LibreOffice UI languages. The code in the custom action that de-selects UI languages based on the Windows UI language(s) and the user's locale had a limit of 100. The consequence was that a few of the alphabetically last LibreOffice UI languages: Ukrainan, Urdu, Uzbek, Venda and Xhosa, were not de-selected even if none of those languages was used by the user or Windows, and thus got installed in a "quick" install and also in a "custom" install unless the person running the installer noticed. Reported by aseques_ on IRC, no bug filed yet. Signed-off-by: Fridrich Štrba <fridrich.strba@bluewin.ch> .../source/win32/customactions/sellang/sellang.cxx | 217 ++++++++++---------- 1 files changed, 104 insertions(+), 113 deletions(-) commit a73c1cff1b27dbef84f0d85d594f9628bb48a827 Author: Thorsten Behrens <tbehrens@novell.com> Date: Wed Jan 26 19:52:02 2011 +0100 Revert "Initial LibO mimetype icon design" This reverts commit bf7cc5f6751d566bccb45b09fb15f82e56fe3333. setup_native/source/win32/nsis/ooosetup.ico | Bin 26918 -> 2238 bytes 1 files changed, 0 insertions(+), 0 deletions(-) commit 88a6c07dc231ed3508ffe81ec624a753f4c49e75 Author: Alexander Thurgood <alex.thurgood@gmail.com> Date: Wed Jan 26 18:10:16 2011 +0100 Fix window focus for langpack installation on Mac fdo# 33056 Signed-off-by: Thorsten Behrens <tbehrens@novell.com> .../scripts/osx_install_languagepack.applescript | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit bf7cc5f6751d566bccb45b09fb15f82e56fe3333 Author: Thorsten Behrens <tbehrens@novell.com> Date: Tue Jan 18 10:26:56 2011 +0100 Initial LibO mimetype icon design As per http://luxate.blogspot.com/2011/01/libreoffice-initial-icons-milestone.html updating the LibO mimetype and app icons (and the installer icon, for coherence). setup_native/source/win32/nsis/ooosetup.ico | Bin 2238 -> 26918 bytes 1 files changed, 0 insertions(+), 0 deletions(-) commit f7d7948cbe9e38e2e219f6024c0add130a5f6480 Author: Kohei Yoshida <kyoshida@novell.com> Date: Fri Jan 14 11:53:12 2011 -0500 Remove pesky on-line registration menu entry. (fdo#33112) .../uiconfig/sbibliography/menubar/menubar.xml | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 3097feb2f56b19a1b10b167f5c5869e2c7920be9 Author: Petr Mladek <pmladek@suse.cz> Date: Tue Jan 11 23:05:56 2011 +0100 Please, ignore the previous message; it was for the libreoffice-3-3-0 branch This is 'libreoffice-3-3' - the stable branch for the 3.3.x releases. Only safe changes, reviewed by anoter person are allowed. If you want to build something cool, unstable, and risky, use master. commit 1b83f908126d09ef6e0015eb531bbd8c4cf57034 Author: Petr Mladek <pmladek@suse.cz> Date: Tue Jan 11 22:39:06 2011 +0100 Branch libreoffice-3-3-0 This is 'libreoffice-3-3-0' - the stable branch for the 3.3.0 release. Only very safe changes, reviewed by three people are allowed. If you want to commit more complicated fix for the next 3.3.x release, please use the 'libreoffice-3-3' branch. If you want to build something cool, unstable, and risky, use master.
Notes
split repo tag: components_libreoffice-3.3.1.1 split repo tag: components_libreoffice-3.3.1.2
Diffstat (limited to 'accessibility/bridge/org')
-rwxr-xr-xaccessibility/bridge/org/openoffice/accessibility/AccessBridge.java28
-rwxr-xr-xaccessibility/bridge/org/openoffice/accessibility/KeyHandler.java44
-rw-r--r--accessibility/bridge/org/openoffice/accessibility/PopupWindow.java2
-rw-r--r--accessibility/bridge/org/openoffice/accessibility/WindowsAccessBridgeAdapter.java32
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/AbstractButton.java38
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/AccessibleActionImpl.java12
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/AccessibleComponentImpl.java82
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/AccessibleEditableTextImpl.java102
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/AccessibleExtendedState.java8
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/AccessibleHypertextImpl.java38
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/AccessibleIconImpl.java16
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/AccessibleKeyBinding.java32
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/AccessibleObjectFactory.java98
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/AccessibleRelationAdapter.java14
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/AccessibleRoleAdapter.java20
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/AccessibleSelectionImpl.java8
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/AccessibleStateAdapter.java36
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java40
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/AccessibleValueImpl.java16
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/Alert.java16
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/Application.java8
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/Button.java26
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/CheckBox.java4
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/ComboBox.java4
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/Component.java198
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/Container.java226
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/DescendantManager.java2
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/Dialog.java196
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/FocusTraversalPolicy.java16
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/Frame.java200
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/Icon.java2
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/Label.java6
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/List.java116
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/Menu.java8
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/MenuContainer.java18
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/MenuItem.java22
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/NativeFrame.java2
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/Paragraph.java42
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/RadioButton.java2
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/ScrollBar.java36
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/Separator.java2
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/Table.java136
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/TextComponent.java46
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/ToggleButton.java2
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/ToolTip.java6
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/Tree.java136
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/Window.java174
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleEventLog.java36
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleHypertextLog.java12
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleTextLog.java8
50 files changed, 1187 insertions, 1187 deletions
diff --git a/accessibility/bridge/org/openoffice/accessibility/AccessBridge.java b/accessibility/bridge/org/openoffice/accessibility/AccessBridge.java
index 454cd15154d4..a5b230cd73cf 100755
--- a/accessibility/bridge/org/openoffice/accessibility/AccessBridge.java
+++ b/accessibility/bridge/org/openoffice/accessibility/AccessBridge.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
@@ -50,13 +50,13 @@ import javax.accessibility.Accessible;
public class AccessBridge {
- //
+ //
protected static java.util.Hashtable topWindowMap = new java.util.Hashtable();
private static java.awt.Window getTopWindowImpl(XAccessible xAccessible) {
- // Because it can not be garantied that
- // WindowsAccessBridgeAdapter.registerTopWindow() is called
- // before windowOpened(), we have to make this operation
+ // Because it can not be garantied that
+ // WindowsAccessBridgeAdapter.registerTopWindow() is called
+ // before windowOpened(), we have to make this operation
// atomic.
synchronized (topWindowMap) {
String oid = UnoRuntime.generateOid(xAccessible);
@@ -85,13 +85,13 @@ public class AccessBridge {
case AccessibleRole.ROOT_PANE:
case AccessibleRole.POPUP_MENU:
return getTopWindow(xAccessibleContext.getAccessibleParent());
-
+
case AccessibleRole.WINDOW:
case AccessibleRole.FRAME:
case AccessibleRole.DIALOG:
case AccessibleRole.ALERT:
return getTopWindowImpl(xAccessible);
-
+
default:
break;
}
@@ -112,12 +112,12 @@ public class AccessBridge {
case AccessibleRole.ROOT_PANE:
case AccessibleRole.POPUP_MENU:
return removeTopWindow(xAccessibleContext.getAccessibleParent());
-
+
case AccessibleRole.WINDOW:
case AccessibleRole.FRAME:
case AccessibleRole.DIALOG:
return (java.awt.Window) topWindowMap.remove(UnoRuntime.generateOid(xAccessible));
-
+
default:
break;
}
@@ -171,7 +171,7 @@ public class AccessBridge {
unoToolkit.addTopWindowListener(this);
String os = (String) System.getProperty("os.name");
-
+
// Try to initialize the WindowsAccessBridgeAdapter
if (os.startsWith("Windows")) {
WindowsAccessBridgeAdapter.attach(xComponentContext);
@@ -224,17 +224,17 @@ public class AccessBridge {
public void disposing(com.sun.star.lang.EventObject event) {
}
-
+
/*
* XComponent
*/
-
+
public void addEventListener(com.sun.star.lang.XEventListener listener) {
}
-
+
public void removeEventListener(com.sun.star.lang.XEventListener listener) {
}
-
+
public void dispose() {
try {
java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue().invokeAndWait(
diff --git a/accessibility/bridge/org/openoffice/accessibility/KeyHandler.java b/accessibility/bridge/org/openoffice/accessibility/KeyHandler.java
index 1e9f2f6520ae..655399c65273 100755
--- a/accessibility/bridge/org/openoffice/accessibility/KeyHandler.java
+++ b/accessibility/bridge/org/openoffice/accessibility/KeyHandler.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
@@ -39,7 +39,7 @@ import javax.accessibility.*;
public class KeyHandler extends Component implements XKeyHandler, java.awt.KeyEventDispatcher {
EventQueue eventQueue;
-
+
public class VCLKeyEvent extends KeyEvent implements Runnable {
boolean consumed = true;
@@ -59,13 +59,13 @@ public class KeyHandler extends Component implements XKeyHandler, java.awt.KeyEv
return consumed;
}
}
-
+
public KeyHandler() {
eventQueue = Toolkit.getDefaultToolkit().getSystemEventQueue();
java.awt.KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(this);
}
-
- /** This method is called by the current KeyboardFocusManager requesting that this KeyEventDispatcher
+
+ /** This method is called by the current KeyboardFocusManager requesting that this KeyEventDispatcher
* dispatch the specified event on its behalf
*/
public boolean dispatchKeyEvent(java.awt.event.KeyEvent e) {
@@ -73,34 +73,34 @@ public class KeyHandler extends Component implements XKeyHandler, java.awt.KeyEv
VCLKeyEvent event = (VCLKeyEvent) e;
event.setConsumed(false);
return true;
- }
+ }
return false;
}
-
+
/** Handler for KeyPressed events */
public boolean keyPressed(com.sun.star.awt.KeyEvent event) {
// try {
- VCLKeyEvent vke = new VCLKeyEvent(this, KeyEvent.KEY_PRESSED,
- AccessibleKeyBinding.convertModifiers(event.Modifiers),
+ VCLKeyEvent vke = new VCLKeyEvent(this, KeyEvent.KEY_PRESSED,
+ AccessibleKeyBinding.convertModifiers(event.Modifiers),
AccessibleKeyBinding.convertKeyCode(event.KeyCode),
event.KeyChar != 0 ? event.KeyChar : KeyEvent.CHAR_UNDEFINED);
-
+
eventQueue.postEvent(vke);
-
- // VCL events for TABs have empty KeyChar
+
+ // VCL events for TABs have empty KeyChar
if (event.KeyCode == com.sun.star.awt.Key.TAB ) {
event.KeyChar = '\t';
}
// Synthesize KEY_TYPED event to emulate Java behavior
if (event.KeyChar != 0) {
- eventQueue.postEvent(new VCLKeyEvent(this,
- KeyEvent.KEY_TYPED,
- AccessibleKeyBinding.convertModifiers(event.Modifiers),
- KeyEvent.VK_UNDEFINED,
+ eventQueue.postEvent(new VCLKeyEvent(this,
+ KeyEvent.KEY_TYPED,
+ AccessibleKeyBinding.convertModifiers(event.Modifiers),
+ KeyEvent.VK_UNDEFINED,
event.KeyChar));
}
-
+
// Wait until the key event is processed
return false;
// eventQueue.invokeAndWait(vke);
@@ -111,16 +111,16 @@ public class KeyHandler extends Component implements XKeyHandler, java.awt.KeyEv
// return false;
// }
}
-
+
/** Handler for KeyReleased events */
public boolean keyReleased(com.sun.star.awt.KeyEvent event) {
// try {
- VCLKeyEvent vke = new VCLKeyEvent(this, KeyEvent.KEY_RELEASED,
+ VCLKeyEvent vke = new VCLKeyEvent(this, KeyEvent.KEY_RELEASED,
AccessibleKeyBinding.convertModifiers(event.Modifiers),
- AccessibleKeyBinding.convertKeyCode(event.KeyCode),
+ AccessibleKeyBinding.convertKeyCode(event.KeyCode),
event.KeyChar != 0 ? event.KeyChar : KeyEvent.CHAR_UNDEFINED);
eventQueue.postEvent(vke);
-
+
// Wait until the key event is processed
return false;
// eventQueue.invokeAndWait(vke);
@@ -131,7 +131,7 @@ public class KeyHandler extends Component implements XKeyHandler, java.awt.KeyEv
// return false;
// }
}
-
+
public void disposing(com.sun.star.lang.EventObject event) {
java.awt.KeyboardFocusManager.getCurrentKeyboardFocusManager().removeKeyEventDispatcher(this);
}
diff --git a/accessibility/bridge/org/openoffice/accessibility/PopupWindow.java b/accessibility/bridge/org/openoffice/accessibility/PopupWindow.java
index a63b0589b4fa..291fd8c097d9 100644
--- a/accessibility/bridge/org/openoffice/accessibility/PopupWindow.java
+++ b/accessibility/bridge/org/openoffice/accessibility/PopupWindow.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/bridge/org/openoffice/accessibility/WindowsAccessBridgeAdapter.java b/accessibility/bridge/org/openoffice/accessibility/WindowsAccessBridgeAdapter.java
index 28e58940867d..299c5cc831ae 100644
--- a/accessibility/bridge/org/openoffice/accessibility/WindowsAccessBridgeAdapter.java
+++ b/accessibility/bridge/org/openoffice/accessibility/WindowsAccessBridgeAdapter.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 WindowsAccessBridgeAdapter {
protected static native boolean createMapping(long jvmaccess);
- // On Windows all native frames must be registered to the access bridge.
+ // On Windows all native frames must be registered to the access bridge.
// Therefor the bridge exports two methods that we try to find here.
protected static void attach(XComponentContext xComponentContext) {
try {
@@ -65,7 +65,7 @@ public class WindowsAccessBridgeAdapter {
revokeVirtualFrame = bridge.getMethod("revokeVirtualFrame",
parameterTypes);
- // load the native dll
+ // load the native dll
System.loadLibrary("java_uno_accessbridge");
Object any = xComponentContext.getValueByName(
@@ -124,7 +124,7 @@ public class WindowsAccessBridgeAdapter {
protected static boolean isAttached() {
return frameMap != null;
}
-
+
protected static Accessible getAccessibleWrapper(XAccessible xAccessible) {
Accessible a = null;
@@ -156,7 +156,7 @@ public class WindowsAccessBridgeAdapter {
case AccessibleRole.TOOL_TIP:
a = PopupWindow.create(xAccessible);
break;
-
+
default:
a = (Accessible) AccessBridge.getTopWindow(xAccessible);
break;
@@ -232,7 +232,7 @@ public class WindowsAccessBridgeAdapter {
e.getMessage());
}
}
-
+
if (a instanceof PopupWindow) {
PopupWindow toolTipWindow = (PopupWindow) a;
toolTipWindow.removeAll();
@@ -249,7 +249,7 @@ public class WindowsAccessBridgeAdapter {
PopupMenuProxy(AccessibleContext ac) {
menu = ac;
menuComponent = menu.getAccessibleComponent();
-
+
/** calculate the bounding rectangle by iterating over the
* the children.
*/
@@ -263,11 +263,11 @@ public class WindowsAccessBridgeAdapter {
if (childAC != null) {
AccessibleComponent comp = ac.getAccessibleComponent();
-
+
if (comp != null) {
java.awt.Point p = comp.getLocationOnScreen();
java.awt.Dimension d = comp.getSize();
-
+
if (p != null && d != null) {
if (p.x < x) {
x = p.x;
@@ -286,7 +286,7 @@ public class WindowsAccessBridgeAdapter {
}
}
}
-
+
width = x2 - x;
height = y2 - y;
}
@@ -454,8 +454,8 @@ public class WindowsAccessBridgeAdapter {
// Not supported by UNO accessibility API
}
- /** Returns the Accessible child, if one exists, contained at the local
- * coordinate Point
+ /** Returns the Accessible child, if one exists, contained at the local
+ * coordinate Point
*/
public javax.accessibility.Accessible getAccessibleAt(java.awt.Point p) {
java.awt.Point p2 = menuComponent.getLocationOnScreen();
@@ -471,7 +471,7 @@ public class WindowsAccessBridgeAdapter {
menuComponent.requestFocus();
}
}
-
+
protected static class ListProxy extends AccessibleContext
implements Accessible, AccessibleComponent {
AccessibleContext list;
@@ -601,7 +601,7 @@ public class WindowsAccessBridgeAdapter {
}
/** Gets the location of this component in the form of a point specifying
- * the component's top-left corner
+ * the component's top-left corner
*/
public java.awt.Point getLocation() {
// This object represents a toplevel object, so getLocation() should
@@ -636,8 +636,8 @@ public class WindowsAccessBridgeAdapter {
// Not supported by UNO accessibility API
}
- /** Returns the Accessible child, if one exists, contained at the local
- * coordinate Point
+ /** Returns the Accessible child, if one exists, contained at the local
+ * coordinate Point
*/
public javax.accessibility.Accessible getAccessibleAt(java.awt.Point p) {
return listComponent.getAccessibleAt(p);
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AbstractButton.java b/accessibility/bridge/org/openoffice/java/accessibility/AbstractButton.java
index be7b72df8732..1540ba8f745f 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/AbstractButton.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/AbstractButton.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
@@ -32,41 +32,41 @@ import javax.accessibility.AccessibleState;
import com.sun.star.uno.*;
import com.sun.star.accessibility.*;
-/**
+/**
*/
public abstract class AbstractButton extends Component {
-
+
protected AbstractButton(XAccessible xAccessible, XAccessibleContext xAccessibleContext) {
super(xAccessible, xAccessibleContext);
}
-
- protected abstract class AccessibleAbstractButton extends AccessibleUNOComponent
+
+ protected abstract class AccessibleAbstractButton extends AccessibleUNOComponent
implements javax.accessibility.AccessibleAction {
-
+
/**
* Though the class is abstract, this should be called by all sub-classes
*/
protected AccessibleAbstractButton() {
super();
}
-
+
/*
* AccessibleContext
*/
-
+
/** Gets the AccessibleAction associated with this object that supports one or more actions */
public javax.accessibility.AccessibleAction getAccessibleAction() {
return this;
}
-
+
/** Gets the AccessibleText associated with this object presenting text on the display */
public javax.accessibility.AccessibleText getAccessibleText() {
-
+
if (disposed)
return null;
-
+
try {
- XAccessibleText unoAccessibleText = (XAccessibleText)
+ XAccessibleText unoAccessibleText = (XAccessibleText)
UnoRuntime.queryInterface(XAccessibleText.class,unoAccessibleComponent);
if (unoAccessibleText != null) {
return new AccessibleTextImpl(unoAccessibleText);
@@ -77,7 +77,7 @@ public abstract class AbstractButton extends Component {
return null;
}
}
-
+
/** Returns the relation set of this object */
public javax.accessibility.AccessibleRelationSet getAccessibleRelationSet() {
try {
@@ -123,7 +123,7 @@ public abstract class AbstractButton extends Component {
/*
* AccessibleAction
*/
-
+
/** Performs the specified Action on the object */
public boolean doAccessibleAction(int param) {
if (param == 0) {
@@ -146,7 +146,7 @@ public abstract class AbstractButton extends Component {
XAccessibleContext xAccessibleContext = unoAccessibleContext;
if (xAccessibleContext != null) {
// Query for XAccessibleAction interface
- XAccessibleAction xAccessibleAction = (XAccessibleAction)
+ XAccessibleAction xAccessibleAction = (XAccessibleAction)
UnoRuntime.queryInterface(XAccessibleAction.class, xAccessibleContext);
if (xAccessibleAction != null) {
@@ -158,15 +158,15 @@ public abstract class AbstractButton extends Component {
}
}
}
-
+
return false;
}
-
+
/** Returns a description of the specified action of the object */
public java.lang.String getAccessibleActionDescription(int param) {
- return javax.swing.UIManager.getString("AbstractButton.clickText");
+ return javax.swing.UIManager.getString("AbstractButton.clickText");
}
-
+
/** Returns the number of accessible actions available in this object */
public int getAccessibleActionCount() {
return 1;
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleActionImpl.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleActionImpl.java
index e4905752d833..ec250f68ac3b 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleActionImpl.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleActionImpl.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
@@ -33,14 +33,14 @@ import com.sun.star.accessibility.XAccessibleAction;
* to the corresponding methods of the UNO XAccessibleAction interface.
*/
public class AccessibleActionImpl implements javax.accessibility.AccessibleAction {
-
+
protected XAccessibleAction unoObject;
-
+
/** Creates new AccessibleActionWrapper */
public AccessibleActionImpl(XAccessibleAction xAccessibleAction) {
unoObject = xAccessibleAction;
}
-
+
public boolean doAccessibleAction(int param) {
try {
return unoObject.doAccessibleAction(param);
@@ -50,7 +50,7 @@ public class AccessibleActionImpl implements javax.accessibility.AccessibleActio
return false;
}
}
-
+
public java.lang.String getAccessibleActionDescription(int param) {
try {
return unoObject.getAccessibleActionDescription(param);
@@ -60,7 +60,7 @@ public class AccessibleActionImpl implements javax.accessibility.AccessibleActio
return null;
}
}
-
+
public int getAccessibleActionCount() {
try {
return unoObject.getAccessibleActionCount();
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleComponentImpl.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleComponentImpl.java
index 5bac982756a2..93df646e87a1 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleComponentImpl.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleComponentImpl.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
@@ -34,20 +34,20 @@ import com.sun.star.accessibility.XAccessibleComponent;
import com.sun.star.uno.UnoRuntime;
public class AccessibleComponentImpl implements javax.accessibility.AccessibleComponent {
-
+
protected XAccessibleComponent unoObject;
// protected XAccessibleExtendedComponent unoAccessibleExtendedComponent = null;
-
+
/** Creates new AccessibleComponentImpl */
public AccessibleComponentImpl(XAccessibleComponent xAccessibleComponent) {
unoObject = xAccessibleComponent;
}
-
+
protected boolean hasState(short state) {
try {
- XAccessibleContext unoAccessibleContext = (XAccessibleContext)
+ XAccessibleContext unoAccessibleContext = (XAccessibleContext)
UnoRuntime.queryInterface(XAccessibleContext.class, unoObject);
- // All UNO accessibility implementations must support XAccessibleContext
+ // All UNO accessibility implementations must support XAccessibleContext
// and return a valid XAccessibleStateSet ..
return unoAccessibleContext.getAccessibleStateSet().contains(state);
} catch (com.sun.star.uno.RuntimeException e) {
@@ -57,11 +57,11 @@ public class AccessibleComponentImpl implements javax.accessibility.AccessibleCo
return false;
}
}
-
+
/*
* XAccessibleComponent
*/
-
+
/** Returns the background color of the object */
public java.awt.Color getBackground() {
try {
@@ -70,11 +70,11 @@ public class AccessibleComponentImpl implements javax.accessibility.AccessibleCo
return null;
}
}
-
+
public void setBackground(java.awt.Color c) {
// Not supported by UNO accessibility API
}
-
+
/** Returns the foreground color of the object */
public java.awt.Color getForeground() {
try {
@@ -83,141 +83,141 @@ public class AccessibleComponentImpl implements javax.accessibility.AccessibleCo
return null;
}
}
-
+
public void setForeground(java.awt.Color c) {
// Not supported by UNO accessibility API
}
-
+
public java.awt.Cursor getCursor() {
// Not supported by UNO accessibility API
return null;
}
-
+
public void setCursor(java.awt.Cursor cursor) {
// Not supported by UNO accessibility API
}
-
+
public java.awt.Font getFont() {
// FIXME
return null;
}
-
+
public void setFont(java.awt.Font f) {
// Not supported by UNO accessibility API
}
-
+
public java.awt.FontMetrics getFontMetrics(java.awt.Font f) {
// FIXME
return null;
}
-
+
public boolean isEnabled() {
return hasState(AccessibleStateType.ENABLED);
}
-
+
public void setEnabled(boolean b) {
// Not supported by UNO accessibility API
}
-
+
public boolean isVisible() {
return hasState(AccessibleStateType.VISIBLE);
}
-
+
public void setVisible(boolean b) {
// Not supported by UNO accessibility API
}
-
+
public boolean isShowing() {
return hasState(AccessibleStateType.SHOWING);
}
-
+
public boolean contains(java.awt.Point p) {
try {
- return unoObject.containsPoint(new com.sun.star.awt.Point(p.x, p.y));
+ return unoObject.containsPoint(new com.sun.star.awt.Point(p.x, p.y));
} catch (com.sun.star.uno.RuntimeException e) {
return false;
}
}
-
+
/** Returns the location of the object on the screen. */
public java.awt.Point getLocationOnScreen() {
try {
- com.sun.star.awt.Point unoPoint = unoObject.getLocationOnScreen();
+ com.sun.star.awt.Point unoPoint = unoObject.getLocationOnScreen();
return new java.awt.Point(unoPoint.X, unoPoint.Y);
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Gets the location of this component in the form of a point specifying the component's top-left corner */
public java.awt.Point getLocation() {
try {
- com.sun.star.awt.Point unoPoint = unoObject.getLocation();
+ com.sun.star.awt.Point unoPoint = unoObject.getLocation();
return new java.awt.Point( unoPoint.X, unoPoint.Y );
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Moves this component to a new location */
public void setLocation(java.awt.Point p) {
// Not supported by UNO accessibility API
}
-
+
/** Gets the bounds of this component in the form of a Rectangle object */
public java.awt.Rectangle getBounds() {
try {
- com.sun.star.awt.Rectangle unoRect = unoObject.getBounds();
+ com.sun.star.awt.Rectangle unoRect = unoObject.getBounds();
return new java.awt.Rectangle(unoRect.X, unoRect.Y, unoRect.Width, unoRect.Height);
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Moves and resizes this component to conform to the new bounding rectangle r */
public void setBounds(java.awt.Rectangle r) {
// Not supported by UNO accessibility API
}
-
+
/** Returns the size of this component in the form of a Dimension object */
public java.awt.Dimension getSize() {
try {
- com.sun.star.awt.Size unoSize = unoObject.getSize();
+ com.sun.star.awt.Size unoSize = unoObject.getSize();
return new java.awt.Dimension(unoSize.Width, unoSize.Height);
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Resizes this component so that it has width d.width and height d.height */
public void setSize(java.awt.Dimension d) {
// Not supported by UNO accessibility API
}
-
+
public javax.accessibility.Accessible getAccessibleAt(java.awt.Point p) {
// Not supported by this implementation
return null;
}
-
+
public boolean isFocusTraversable() {
return hasState(AccessibleStateType.FOCUSABLE);
}
-
+
public void requestFocus() {
unoObject.grabFocus();
}
-
+
/**
* Adds the specified focus listener to receive focus events from
* this component when this component gains input focus.
* If listener <code>l</code> is <code>null</code>,
* no exception is thrown and no action is performed.
*/
-
+
public void addFocusListener(java.awt.event.FocusListener l) {
// Not supported by this implementation
}
-
+
/**
* Removes the specified focus listener so that it no longer
* receives focus events from this component. This method performs
@@ -226,7 +226,7 @@ public class AccessibleComponentImpl implements javax.accessibility.AccessibleCo
* If listener <code>l</code> is <code>null</code>,
* no exception is thrown and no action is performed.
*/
-
+
public void removeFocusListener(java.awt.event.FocusListener l) {
// Not supported by this implementation
}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleEditableTextImpl.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleEditableTextImpl.java
index 4863b560ef71..6749aaad5519 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleEditableTextImpl.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleEditableTextImpl.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 javax.swing.text.StyleConstants;
*/
public class AccessibleEditableTextImpl extends AccessibleTextImpl implements javax.accessibility.AccessibleEditableText {
final static double toPointFactor = 1 / (7/10 + 34.5);
-
+
/** Creates new GenericAccessibleEditableText object */
public AccessibleEditableTextImpl(XAccessibleEditableText xAccessibleEditableText) {
super(xAccessibleEditableText);
}
-
+
/** Cuts the text between two indices into the system clipboard */
public void cut(int startIndex, int endIndex) {
try {
@@ -55,7 +55,7 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja
} catch (com.sun.star.uno.RuntimeException e) {
}
}
-
+
/** Deletes the text between two indices */
public void delete(int startIndex, int endIndex) {
try {
@@ -64,7 +64,7 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja
} catch (com.sun.star.uno.RuntimeException e) {
}
}
-
+
/** Returns the text range between two indices */
public String getTextRange(int startIndex, int endIndex) {
try {
@@ -74,7 +74,7 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja
}
return null;
}
-
+
/** Inserts the specified string at the given index */
public void insertTextAtIndex(int index, String s){
try {
@@ -83,7 +83,7 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja
} catch (com.sun.star.uno.RuntimeException e) {
}
}
-
+
/** Pastes the text form the system clipboard into the text starting at the specified index */
public void paste(int startIndex) {
try {
@@ -92,35 +92,35 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja
} catch (com.sun.star.uno.RuntimeException e) {
}
}
-
+
/** Replaces the text between two indices with the specified string */
public void replaceText(int startIndex, int endIndex, String s) {
try {
((XAccessibleEditableText) unoObject).replaceText(startIndex, endIndex, s);
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
} catch (com.sun.star.uno.RuntimeException e) {
- }
+ }
}
-
+
/** Selects the text between two indices */
public void selectText(int startIndex, int endIndex) {
try {
unoObject.setSelection(startIndex, endIndex);
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
} catch (com.sun.star.uno.RuntimeException e) {
- }
+ }
}
-
+
/** Sets the attributes for the text between two indices */
public void setAttributes(int startIndex, int endIndex, javax.swing.text.AttributeSet as) {
java.util.Vector propertyValues = new java.util.Vector();
-
+
// Convert Alignment attribute
Object attribute = as.getAttribute(StyleConstants.Alignment);
if (null != attribute) {
com.sun.star.beans.PropertyValue propertyValue = new com.sun.star.beans.PropertyValue();
propertyValue.Name = "ParaAdjust";
-
+
switch (StyleConstants.getAlignment(as)) {
case StyleConstants.ALIGN_RIGHT:
propertyValue.Value = ParagraphAdjust.RIGHT;
@@ -137,7 +137,7 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja
}
propertyValues.add(propertyValue);
}
-
+
// Convert Background attribute
attribute = as.getAttribute(StyleConstants.Background);
if (null != attribute) {
@@ -146,9 +146,9 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja
propertyValue.Value = new Integer(StyleConstants.getBackground(as).getRGB());
propertyValues.add(propertyValue);
}
-
+
// FIXME: BidiLevel
-
+
// Set Bold attribute
attribute = as.getAttribute(StyleConstants.Bold);
if (null != attribute) {
@@ -161,9 +161,9 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja
}
propertyValues.add(propertyValue);
}
-
+
// FIXME: Java 1.4 ComponentAttribute, ComponentElementName, ComposedTextAttribute
-
+
// Set FirstLineIndent attribute
attribute = as.getAttribute(StyleConstants.FirstLineIndent);
if (null != attribute) {
@@ -172,13 +172,13 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja
propertyValue.Value = new Double(StyleConstants.getFirstLineIndent(as) / toPointFactor);
propertyValues.add(propertyValue);
}
-
+
// Set font family attribute
attribute = as.getAttribute(StyleConstants.FontFamily);
if (null != attribute) {
com.sun.star.beans.PropertyValue propertyValue = new com.sun.star.beans.PropertyValue();
propertyValue.Name = "CharFontPitch";
-
+
if (StyleConstants.getFontFamily(as).equals( "Proportional" )) {
propertyValue.Value = new Short("2");
} else {
@@ -186,7 +186,7 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja
}
propertyValues.add(propertyValue);
}
-
+
// Set font size attribute
attribute = as.getAttribute(StyleConstants.FontSize);
if (null != attribute) {
@@ -195,7 +195,7 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja
propertyValue.Value = new Integer(StyleConstants.getFontSize(as));
propertyValues.add(propertyValue);
}
-
+
// Map foreground color
attribute = as.getAttribute(StyleConstants.Foreground);
if (null != attribute) {
@@ -204,15 +204,15 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja
propertyValue.Value = new Integer (StyleConstants.getForeground(as).getRGB());
propertyValues.add(propertyValue);
}
-
+
// FIXME: IconAttribute, IconElementName
-
+
// Set italic attribute
attribute = as.getAttribute(StyleConstants.Italic);
if (null != attribute) {
com.sun.star.beans.PropertyValue propertyValue = new com.sun.star.beans.PropertyValue();
propertyValue.Name = "CharPosture";
-
+
if (StyleConstants.isItalic(as)) {
propertyValue.Value = FontSlant.ITALIC;
} else {
@@ -220,7 +220,7 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja
}
propertyValues.add(propertyValue);
}
-
+
// Set left indent attribute
attribute = as.getAttribute(StyleConstants.LeftIndent);
if (null != attribute) {
@@ -229,7 +229,7 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja
propertyValue.Value = new Integer(new Double(StyleConstants.getLeftIndent(as) / toPointFactor).intValue());
propertyValues.add(propertyValue);
}
-
+
// Set right indent attribute
attribute = as.getAttribute(StyleConstants.RightIndent);
if (null != attribute) {
@@ -238,7 +238,7 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja
propertyValue.Value = new Integer(new Double(StyleConstants.getRightIndent(as) / toPointFactor).intValue());
propertyValues.add(propertyValue);
}
-
+
// Set line spacing attribute
attribute = as.getAttribute(StyleConstants.LineSpacing);
if (null != attribute) {
@@ -247,9 +247,9 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja
propertyValue.Value = new Integer(new Double(StyleConstants.getLineSpacing(as) / toPointFactor).intValue());
propertyValues.add(propertyValue);
}
-
- // FIXME: Java 1.4 NameAttribute, Orientation, ResolveAttribute
-
+
+ // FIXME: Java 1.4 NameAttribute, Orientation, ResolveAttribute
+
// Set space above attribute
attribute = as.getAttribute(StyleConstants.SpaceAbove);
if (null != attribute) {
@@ -258,7 +258,7 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja
propertyValue.Value = new Integer(new Double( StyleConstants.getSpaceAbove(as) / toPointFactor).intValue());
propertyValues.add(propertyValue);
}
-
+
// Set space below attribute
attribute = as.getAttribute(StyleConstants.SpaceBelow);
if (null != attribute) {
@@ -267,7 +267,7 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja
propertyValue.Value = new Integer(new Double(StyleConstants.getSpaceBelow(as) / toPointFactor).intValue());
propertyValues.add(propertyValue);
}
-
+
// Set strike through attribute
attribute = as.getAttribute(StyleConstants.StrikeThrough);
if (null != attribute) {
@@ -280,7 +280,7 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja
}
propertyValues.add(propertyValue);
}
-
+
// Set sub-/superscript attribute
attribute = as.getAttribute(StyleConstants.Superscript);
if (null == attribute) {
@@ -289,7 +289,7 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja
if (null != attribute) {
com.sun.star.beans.PropertyValue propertyValue = new com.sun.star.beans.PropertyValue();
propertyValue.Name = "CharEscapement";
-
+
if (StyleConstants.isSuperscript(as)) {
propertyValue.Value = new Short( "1" );
} else if (StyleConstants.isSubscript(as)) {
@@ -299,49 +299,49 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja
}
propertyValues.add(propertyValue);
}
-
+
// Set tabset attribute
attribute = as.getAttribute(StyleConstants.TabSet);
if (null != attribute) {
com.sun.star.beans.PropertyValue propertyValue = new com.sun.star.beans.PropertyValue();
propertyValue.Name = "ParaTabStops";
-
+
javax.swing.text.TabSet tabSet = StyleConstants.getTabSet(as);
- java.util.ArrayList tabStops = new java.util.ArrayList(tabSet.getTabCount());
-
+ java.util.ArrayList tabStops = new java.util.ArrayList(tabSet.getTabCount());
+
for (int i = 0, max = tabSet.getTabCount(); i < max; i++) {
javax.swing.text.TabStop tab = tabSet.getTab(i);
com.sun.star.style.TabStop unoTab = new com.sun.star.style.TabStop();
-
+
unoTab.Position = new Double(tab.getPosition() / toPointFactor).intValue();
-
+
switch (tab.getAlignment()) {
- case javax.swing.text.TabStop.ALIGN_CENTER:
+ case javax.swing.text.TabStop.ALIGN_CENTER:
unoTab.Alignment = TabAlign.CENTER;
break;
- case javax.swing.text.TabStop.ALIGN_RIGHT:
+ case javax.swing.text.TabStop.ALIGN_RIGHT:
unoTab.Alignment = TabAlign.RIGHT;
break;
- case javax.swing.text.TabStop.ALIGN_DECIMAL:
+ case javax.swing.text.TabStop.ALIGN_DECIMAL:
unoTab.Alignment = TabAlign.DECIMAL;
break;
- default:
+ default:
unoTab.Alignment = TabAlign.LEFT;
break;
}
-
+
tabStops.add(unoTab);
}
propertyValue.Value = (com.sun.star.style.TabStop[]) tabStops.toArray();
propertyValues.add(propertyValue);
}
-
+
// Set underline attribute
attribute = as.getAttribute(StyleConstants.Underline);
if (null != attribute) {
com.sun.star.beans.PropertyValue propertyValue = new com.sun.star.beans.PropertyValue();
propertyValue.Name = "CharUnderline";
-
+
if (StyleConstants.isUnderline(as)) {
propertyValue.Value = new Short(FontUnderline.SINGLE);
} else {
@@ -349,14 +349,14 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja
}
propertyValues.add(propertyValue);
}
-
+
try {
((XAccessibleEditableText) unoObject).setAttributes(startIndex, endIndex, (com.sun.star.beans.PropertyValue[]) propertyValues.toArray());
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
} catch (com.sun.star.uno.RuntimeException e) {
}
}
-
+
/** Sets the text contents to the specified string */
public void setTextContents(String s) {
try {
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleExtendedState.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleExtendedState.java
index 3d4500d322df..a6eb653ef470 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleExtendedState.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleExtendedState.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,10 +35,10 @@ public class AccessibleExtendedState extends AccessibleState {
public static final AccessibleState MANAGES_DESCENDANTS;
public static final AccessibleState SENSITIVE;
public static final AccessibleState STALE;
-
+
static {
DEFUNCT = new AccessibleExtendedState("defunct");
-
+
// JAVA 1.5: will come with manages_descendants and indeterminate
INDETERMINATE = new AccessibleExtendedState("indeterminate");
MANAGES_DESCENDANTS = new AccessibleExtendedState("managesDescendants");
@@ -46,7 +46,7 @@ public class AccessibleExtendedState extends AccessibleState {
SENSITIVE = new AccessibleExtendedState("sensitive");
STALE = new AccessibleExtendedState("stale");
}
-
+
protected AccessibleExtendedState(String key) {
super(key);
}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleHypertextImpl.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleHypertextImpl.java
index 1bb3bc5961ad..3927f78de86b 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleHypertextImpl.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleHypertextImpl.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
@@ -33,19 +33,19 @@ import com.sun.star.accessibility.*;
import com.sun.star.uno.*;
/** The AccessibleHypertextImpl mapps all calls to the java AccessibleHypertext
- * interface to the corresponding methods of the UNO XAccessibleHypertext
+ * interface to the corresponding methods of the UNO XAccessibleHypertext
* interface.
*/
-public class AccessibleHypertextImpl extends AccessibleTextImpl
+public class AccessibleHypertextImpl extends AccessibleTextImpl
implements javax.accessibility.AccessibleHypertext {
protected class Hyperlink extends javax.accessibility.AccessibleHyperlink {
protected XAccessibleHyperlink unoObject;
-
+
public Hyperlink(XAccessibleHyperlink xHyperlink) {
unoObject = xHyperlink;
}
-
+
public int getStartIndex() {
try {
System.err.println("StartIndex: " + unoObject.getStartIndex());
@@ -54,7 +54,7 @@ public class AccessibleHypertextImpl extends AccessibleTextImpl
return -1;
}
}
-
+
public Object getAccessibleActionObject(int param) {
System.err.println("getActionObject");
try {
@@ -73,7 +73,7 @@ public class AccessibleHypertextImpl extends AccessibleTextImpl
return null;
}
-
+
public int getEndIndex() {
try {
System.err.println("StartIndex: " + unoObject.getEndIndex());
@@ -82,7 +82,7 @@ public class AccessibleHypertextImpl extends AccessibleTextImpl
return -1;
}
}
-
+
public Object getAccessibleActionAnchor(int param) {
System.err.println("getActionAnchor");
try {
@@ -97,11 +97,11 @@ public class AccessibleHypertextImpl extends AccessibleTextImpl
}
return null;
}
-
+
public boolean isValid() {
return unoObject.isValid();
}
-
+
public boolean doAccessibleAction(int param) {
try {
return unoObject.doAccessibleAction(param);
@@ -111,7 +111,7 @@ public class AccessibleHypertextImpl extends AccessibleTextImpl
return false;
}
}
-
+
public String getAccessibleActionDescription(int param) {
try {
return unoObject.getAccessibleActionDescription(param);
@@ -119,7 +119,7 @@ public class AccessibleHypertextImpl extends AccessibleTextImpl
return null;
}
}
-
+
public int getAccessibleActionCount() {
try {
return unoObject.getAccessibleActionCount();
@@ -128,7 +128,7 @@ public class AccessibleHypertextImpl extends AccessibleTextImpl
}
}
}
-
+
/** Creates new AccessibleHypertextImpl */
public AccessibleHypertextImpl(XAccessibleHypertext xAccessibleHypertext) {
if (Build.PRODUCT) {
@@ -142,16 +142,16 @@ public class AccessibleHypertextImpl extends AccessibleTextImpl
}
}
}
-
+
public static javax.accessibility.AccessibleText get(com.sun.star.uno.XInterface unoObject) {
try {
XAccessibleHypertext unoAccessibleHypertext = (XAccessibleHypertext)
UnoRuntime.queryInterface(XAccessibleHypertext.class, unoObject);
if (unoAccessibleHypertext != null) {
return new AccessibleHypertextImpl(unoAccessibleHypertext);
- }
-
- XAccessibleText unoAccessibleText = (XAccessibleText)
+ }
+
+ XAccessibleText unoAccessibleText = (XAccessibleText)
UnoRuntime.queryInterface(XAccessibleText.class, unoObject);
if (unoAccessibleText != null) {
return new AccessibleTextImpl(unoAccessibleText);
@@ -170,7 +170,7 @@ public class AccessibleHypertextImpl extends AccessibleTextImpl
throw new IndexOutOfBoundsException(exception.getMessage());
}
}
-
+
public int getLinkCount() {
try {
return ((XAccessibleHypertext) unoObject).getHyperLinkCount();
@@ -178,7 +178,7 @@ public class AccessibleHypertextImpl extends AccessibleTextImpl
return 0;
}
}
-
+
public int getLinkIndex(int param) {
try {
return ((XAccessibleHypertext) unoObject).getHyperLinkIndex(param);
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleIconImpl.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleIconImpl.java
index ba41534f245b..c79fbae89b68 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleIconImpl.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleIconImpl.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
@@ -29,16 +29,16 @@ package org.openoffice.java.accessibility;
import com.sun.star.accessibility.XAccessibleImage;
-/**
+/**
*/
public class AccessibleIconImpl implements javax.accessibility.AccessibleIcon {
-
+
XAccessibleImage unoAccessibleImage;
-
+
public AccessibleIconImpl(XAccessibleImage xImage) {
unoAccessibleImage = xImage;
}
-
+
/** Gets the description of the icon */
public String getAccessibleIconDescription() {
try {
@@ -47,7 +47,7 @@ public class AccessibleIconImpl implements javax.accessibility.AccessibleIcon {
return null;
}
}
-
+
/** Gets the height of the icon */
public int getAccessibleIconHeight() {
try {
@@ -56,7 +56,7 @@ public class AccessibleIconImpl implements javax.accessibility.AccessibleIcon {
return 0;
}
}
-
+
/** Gets the width of the icon */
public int getAccessibleIconWidth() {
try {
@@ -65,7 +65,7 @@ public class AccessibleIconImpl implements javax.accessibility.AccessibleIcon {
return 0;
}
}
-
+
/** Sets the description of the icon */
public void setAccessibleIconDescription(String s) {
// Not supported
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleKeyBinding.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleKeyBinding.java
index 1eb3201c5d68..fc58e6b384e4 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleKeyBinding.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleKeyBinding.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
@@ -30,27 +30,27 @@ package org.openoffice.java.accessibility;
import com.sun.star.accessibility.*;
import com.sun.star.awt.KeyStroke;
-/**
- *
+/**
+ *
*/
-public class AccessibleKeyBinding extends Object implements javax.accessibility.AccessibleKeyBinding {
-
+public class AccessibleKeyBinding extends Object implements javax.accessibility.AccessibleKeyBinding {
+
XAccessibleKeyBinding unoAccessibleKeybinding;
-
+
public AccessibleKeyBinding(XAccessibleKeyBinding unoKB) {
unoAccessibleKeybinding = unoKB;
}
-
+
public static int convertModifiers(short s) {
int modifiers = 0;
if ((s & com.sun.star.awt.KeyModifier.SHIFT) != 0) {
modifiers = modifiers | java.awt.event.KeyEvent.SHIFT_DOWN_MASK;
}
-
+
if ((s & com.sun.star.awt.KeyModifier.MOD1) != 0) {
modifiers = modifiers | java.awt.event.KeyEvent.CTRL_DOWN_MASK;
}
-
+
if ((s & com.sun.star.awt.KeyModifier.MOD2) != 0) {
modifiers = modifiers | java.awt.event.KeyEvent.ALT_DOWN_MASK;
}
@@ -61,10 +61,10 @@ public class AccessibleKeyBinding extends Object implements javax.accessibility.
return modifiers;
}
-
+
public static int convertKeyCode(short s) {
int keycode = java.awt.event.KeyEvent.VK_UNDEFINED;
-
+
switch(s) {
case com.sun.star.awt.Key.NUM0:
keycode = java.awt.event.KeyEvent.VK_0;
@@ -344,11 +344,11 @@ public class AccessibleKeyBinding extends Object implements javax.accessibility.
}
return keycode;
}
-
+
/*
* AccessibleKeyBinding
*/
-
+
/** Returns a key binding for this object */
public Object getAccessibleKeyBinding(int i) {
try {
@@ -362,19 +362,19 @@ public class AccessibleKeyBinding extends Object implements javax.accessibility.
data[j] = null;
}
}
-
+
if (keys.length == 1) {
return data[0];
} else {
return data;
- }
+ }
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
return null;
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Returns the number of key bindings for this object */
public int getAccessibleKeyBindingCount() {
try {
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleObjectFactory.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleObjectFactory.java
index 129a3b820993..aa227692a813 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleObjectFactory.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleObjectFactory.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,25 +40,25 @@ import org.openoffice.java.accessibility.logging.XAccessibleEventLog;
public class AccessibleObjectFactory {
// This type is needed for conversions from/to uno Any
public static final Type XAccessibleType = new Type(XAccessible.class);
-
+
private static java.util.Hashtable objectList = new java.util.Hashtable();
private static java.awt.FocusTraversalPolicy focusTraversalPolicy = new FocusTraversalPolicy();
-
+
private static java.awt.EventQueue theEventQueue = java.awt.Toolkit.getDefaultToolkit().
getSystemEventQueue();
-
+
public static java.awt.EventQueue getEventQueue() {
return theEventQueue;
}
-
+
public static void postFocusGained(java.awt.Component c) {
getEventQueue().postEvent(new java.awt.event.FocusEvent(c, java.awt.event.FocusEvent.FOCUS_GAINED));
}
-
+
public static void postWindowGainedFocus(java.awt.Window w) {
postWindowEvent(w, java.awt.event.WindowEvent.WINDOW_GAINED_FOCUS);
}
-
+
public static void postWindowLostFocus(java.awt.Window w) {
postWindowEvent(w, java.awt.event.WindowEvent.WINDOW_LOST_FOCUS);
}
@@ -70,15 +70,15 @@ public class AccessibleObjectFactory {
public static void postWindowDeactivated(java.awt.Window w) {
postWindowEvent(w, java.awt.event.WindowEvent.WINDOW_DEACTIVATED);
}
-
+
public static void postWindowOpened(java.awt.Window w) {
postWindowEvent(w, java.awt.event.WindowEvent.WINDOW_OPENED);
}
-
+
public static void postWindowClosed(java.awt.Window w) {
postWindowEvent(w, java.awt.event.WindowEvent.WINDOW_CLOSED);
}
-
+
public static void invokeAndWait() {
try {
theEventQueue.invokeAndWait( new java.lang.Runnable () {
@@ -89,17 +89,17 @@ public class AccessibleObjectFactory {
} catch (java.lang.InterruptedException e) {
}
}
-
+
private static void postWindowEvent(java.awt.Window w, int i) {
theEventQueue.postEvent(new java.awt.event.WindowEvent(w, i));
}
-
+
public static java.awt.Component getAccessibleComponent(XAccessible xAccessible) {
java.awt.Component c = null;
if (xAccessible != null) {
// Retrieve unique id for the original UNO object to be used as a hash key
String oid = UnoRuntime.generateOid(xAccessible);
-
+
// Check if we already have a wrapper object for this context
synchronized (objectList) {
WeakReference r = (WeakReference) objectList.get(oid);
@@ -118,7 +118,7 @@ public class AccessibleObjectFactory {
System.err.println(e.getClass().getName() + " caught: " + e.getMessage());
}
}
-
+
public static void addChild(java.awt.Container parent, XAccessible child) {
try {
if (child != null) {
@@ -127,19 +127,19 @@ public class AccessibleObjectFactory {
XAccessibleStateSet stateSet = childAC.getAccessibleStateSet();
if (stateSet != null) {
java.awt.Component c = getAccessibleComponent(child);
-
+
// Re-use existing wrapper if possible, create a new one otherwise
if (c != null) {
// Seems to be already in child list
if (parent.equals(c.getParent()))
return;
- // Update general component states
+ // Update general component states
c.setEnabled(stateSet.contains(AccessibleStateType.ENABLED));
c.setVisible(stateSet.contains(AccessibleStateType.VISIBLE));
} else {
c = createAccessibleComponentImpl(child, childAC, stateSet);
}
-
+
if (c != null) {
if (c instanceof java.awt.Container) {
populateContainer((java.awt.Container) c, childAC);
@@ -163,7 +163,7 @@ public class AccessibleObjectFactory {
try {
XAccessible xAccessible = (XAccessible) AnyConverter.toObject(XAccessibleType, any);
java.awt.Component c = getAccessibleComponent(xAccessible);
-
+
if (c != null) {
parent.remove(c);
@@ -176,8 +176,8 @@ public class AccessibleObjectFactory {
}
}
-
- /**
+
+ /**
* Removes all children from the container parent
*/
@@ -189,11 +189,11 @@ public class AccessibleObjectFactory {
if (c instanceof java.awt.Container) {
clearContainer((java.awt.Container) c);
}
- }
- parent.removeAll();
+ }
+ parent.removeAll();
}
-
-
+
+
/**
* Populates the given Container parent with wrapper objects for all children of parentAC. This method is
* intended to be called when a container is added using a CHILDREN_CHANGED event.
@@ -212,7 +212,7 @@ public class AccessibleObjectFactory {
}
}
}
-
+
/**
* Populates the given Container parent with wrapper objects for all children of parentAC. This method is
* intended to be called when a new window has been opened.
@@ -237,17 +237,17 @@ public class AccessibleObjectFactory {
}
}
}
-
+
catch (java.lang.Exception e) {
System.err.println(e.getClass().getName() + " caught: " + e.getMessage());
e.printStackTrace();
}
}
}
-
+
protected static java.awt.Component createAccessibleComponent(XAccessible xAccessible) {
try {
- XAccessibleContext xAccessibleContext = xAccessible.getAccessibleContext();
+ XAccessibleContext xAccessibleContext = xAccessible.getAccessibleContext();
if (xAccessibleContext != null) {
return createAccessibleComponentImpl(xAccessible, xAccessibleContext, xAccessibleContext.getAccessibleStateSet());
}
@@ -257,8 +257,8 @@ public class AccessibleObjectFactory {
}
return null;
}
-
- protected static java.awt.Component createAccessibleComponent(XAccessible xAccessible, XAccessibleContext xAccessibleContext,
+
+ protected static java.awt.Component createAccessibleComponent(XAccessible xAccessible, XAccessibleContext xAccessibleContext,
java.awt.Window frame) {
if (xAccessibleContext != null) {
try {
@@ -269,7 +269,7 @@ public class AccessibleObjectFactory {
if (xAccessibleStateSet.contains(AccessibleStateType.FOCUSED)) {
if (frame instanceof NativeFrame) {
((NativeFrame) frame).setInitialComponent(c);
- }
+ }
}
return c;
}
@@ -280,8 +280,8 @@ public class AccessibleObjectFactory {
}
return null;
}
-
- protected static java.awt.Component createAccessibleComponentImpl(XAccessible xAccessible, XAccessibleContext xAccessibleContext,
+
+ protected static java.awt.Component createAccessibleComponentImpl(XAccessible xAccessible, XAccessibleContext xAccessibleContext,
XAccessibleStateSet xAccessibleStateSet) {
java.awt.Component c = null;
short role = xAccessibleContext.getAccessibleRole();
@@ -411,7 +411,7 @@ public class AccessibleObjectFactory {
case AccessibleRole.COLUMN_HEADER:
case AccessibleRole.TABLE:
if (xAccessibleStateSet.contains(AccessibleStateType.MANAGES_DESCENDANTS)) {
- c = new Table(xAccessible, xAccessibleContext,
+ c = new Table(xAccessible, xAccessibleContext,
xAccessibleStateSet.contains(AccessibleStateType.MULTI_SELECTABLE));
} else {
c = new Container(javax.accessibility.AccessibleRole.TABLE,
@@ -464,20 +464,20 @@ public class AccessibleObjectFactory {
// System.out.println("Object cache now contains " + objectList.size() + " objects.");
}
}
-
+
AccessibleStateAdapter.setComponentState(c, xAccessibleStateSet);
-
+
if (! Build.PRODUCT) {
String property = System.getProperty("AccessBridgeLogging");
if ((property != null) && (property.indexOf("event") != -1)) {
XAccessibleEventLog.addEventListener(xAccessibleContext, c);
- }
+ }
}
}
-
+
return c;
}
-
+
protected static void disposing(java.awt.Component c) {
if (c != null) {
synchronized (objectList) {
@@ -488,29 +488,29 @@ public class AccessibleObjectFactory {
public static java.awt.Window getTopWindow(XAccessible xAccessible) {
XAccessibleContext xAccessibleContext = xAccessible.getAccessibleContext();
-
+
if (xAccessibleContext != null) {
short role = xAccessibleContext.getAccessibleRole();
XAccessibleStateSet xAccessibleStateSet = xAccessibleContext.getAccessibleStateSet();
- XAccessibleComponent xAccessibleComponent = (XAccessibleComponent)
+ XAccessibleComponent xAccessibleComponent = (XAccessibleComponent)
UnoRuntime.queryInterface(XAccessibleComponent.class, xAccessibleContext);
java.awt.Window w;
if (role == AccessibleRole.DIALOG) {
- w = new Dialog(new Application(),
- xAccessibleContext.getAccessibleName(),
+ w = new Dialog(new Application(),
+ xAccessibleContext.getAccessibleName(),
xAccessibleStateSet.contains(AccessibleStateType.MODAL),
xAccessibleComponent);
} else if (role == AccessibleRole.ALERT) {
- w = new Alert(new Application(),
- xAccessibleContext.getAccessibleName(),
+ w = new Alert(new Application(),
+ xAccessibleContext.getAccessibleName(),
xAccessibleStateSet.contains(AccessibleStateType.MODAL),
xAccessibleComponent);
} else if (role == AccessibleRole.FRAME) {
- w = new Frame(xAccessibleContext.getAccessibleName(),
+ w = new Frame(xAccessibleContext.getAccessibleName(),
xAccessibleComponent);
} else if (role == AccessibleRole.WINDOW) {
- java.awt.Window activeWindow =
+ java.awt.Window activeWindow =
java.awt.KeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow();
if (activeWindow != null) {
w = new Window(activeWindow, xAccessibleComponent);
@@ -529,7 +529,7 @@ public class AccessibleObjectFactory {
populateContainer(w, xAccessibleContext, w);
w.setFocusTraversalPolicy(focusTraversalPolicy);
w.setVisible(true);
-
+
// Make the new window the focused one if it has an initialy focused object set.
java.awt.Component c = ((NativeFrame) w).getInitialComponent();
if (c != null) {
@@ -537,7 +537,7 @@ public class AccessibleObjectFactory {
}
return w;
}
-
+
return null;
}
}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleRelationAdapter.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleRelationAdapter.java
index 2f1709acac45..18f3638eebe4 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleRelationAdapter.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleRelationAdapter.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
@@ -31,11 +31,11 @@ import javax.accessibility.Accessible;
import com.sun.star.accessibility.AccessibleRelation;
import com.sun.star.accessibility.XAccessible;
-/**
+/**
*/
public abstract class AccessibleRelationTypeMap {
-
- final static String[] data = {
+
+ final static String[] data = {
null,
javax.accessibility.AccessibleRelation.CONTROLLED_BY,
javax.accessibility.AccessibleRelation.CONTROLLED_BY,
@@ -48,14 +48,14 @@ public abstract class AccessibleRelationTypeMap {
javax.accessibility.AccessibleRelation.MEMBER_OF,
javax.accessibility.AccessibleRelation.MEMBER_OF
};
-
+
public static void fillAccessibleRelationSet(javax.accessibility.AccessibleRelationSet s, AccessibleRelation[] relations) {
AccessibleObjectFactory factory = AccessibleObjectFactory.getDefault();
for(int i=0; i<relations.length; i++) {
if( relations[i].RelationType < data.length && data[relations[i].RelationType] != null ) {
- javax.accessibility.AccessibleRelation r =
+ javax.accessibility.AccessibleRelation r =
new javax.accessibility.AccessibleRelation(data[relations[i].RelationType]);
-
+
r.setTarget(factory.getAccessibleObjectSet(relations[i].TargetSet));
s.add(r);
}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleRoleAdapter.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleRoleAdapter.java
index c7f630fdd3ab..468b641c937e 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleRoleAdapter.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleRoleAdapter.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
@@ -33,20 +33,20 @@ import com.sun.star.accessibility.XAccessibleContext;
/** This class maps the AccessibleRole(s) of the UNO accessibility API
* to the corresponding javax.accessibility objects.
*/
-public abstract class AccessibleRoleAdapter {
-
+public abstract class AccessibleRoleAdapter {
+
/* This array is used as a mapping between the UNO AccessibleRole
* and the AccessibleRole objects of the Java accessibility API.
*/
- public static final javax.accessibility.AccessibleRole[] data = {
+ public static final javax.accessibility.AccessibleRole[] data = {
javax.accessibility.AccessibleRole.UNKNOWN,
- javax.accessibility.AccessibleRole.ALERT,
+ javax.accessibility.AccessibleRole.ALERT,
javax.accessibility.AccessibleRole.COLUMN_HEADER,
javax.accessibility.AccessibleRole.CANVAS,
javax.accessibility.AccessibleRole.CHECK_BOX,
javax.accessibility.AccessibleRole.CHECK_BOX, // CHECK_MENU_ITEM
javax.accessibility.AccessibleRole.COLOR_CHOOSER,
- javax.accessibility.AccessibleRole.COMBO_BOX,
+ javax.accessibility.AccessibleRole.COMBO_BOX,
javax.accessibility.AccessibleRole.DATE_EDITOR,
javax.accessibility.AccessibleRole.DESKTOP_ICON,
javax.accessibility.AccessibleRole.DESKTOP_PANE,
@@ -96,7 +96,7 @@ public abstract class AccessibleRoleAdapter {
javax.accessibility.AccessibleRole.SLIDER,
javax.accessibility.AccessibleRole.SPIN_BOX,
javax.accessibility.AccessibleRole.SPLIT_PANE,
- javax.accessibility.AccessibleRole.STATUS_BAR,
+ javax.accessibility.AccessibleRole.STATUS_BAR,
javax.accessibility.AccessibleRole.TABLE,
javax.accessibility.AccessibleRole.LABEL, // TABLE_CELL - required by ZoomText
javax.accessibility.AccessibleRole.TEXT,
@@ -119,9 +119,9 @@ public abstract class AccessibleRoleAdapter {
javax.accessibility.AccessibleRole.RULER,
javax.accessibility.AccessibleRole.PANEL, // SECTION
javax.accessibility.AccessibleRole.LABEL, // TREE_ITEM
- javax.accessibility.AccessibleRole.TABLE // TREE_TABLE
+ javax.accessibility.AccessibleRole.TABLE // TREE_TABLE
};
-
+
public static javax.accessibility.AccessibleRole getAccessibleRole(short role) {
if(role < data.length) {
if(data[role] == null) {
@@ -133,7 +133,7 @@ public abstract class AccessibleRoleAdapter {
System.err.println("Unmappable role: " + role);
return null;
}
-
+
public static javax.accessibility.AccessibleRole getAccessibleRole(XAccessible unoAccessible) {
try {
XAccessibleContext unoAccessibleContext = unoAccessible.getAccessibleContext();
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleSelectionImpl.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleSelectionImpl.java
index 6e40c1e7a78d..312460f23fa0 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleSelectionImpl.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleSelectionImpl.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
@@ -31,11 +31,11 @@ import com.sun.star.accessibility.*;
class AccessibleSelectionImpl implements javax.accessibility.AccessibleSelection {
XAccessibleSelection unoAccessibleSelection;
-
+
AccessibleSelectionImpl(XAccessibleSelection xAccessibleSelection) {
unoAccessibleSelection = xAccessibleSelection;
}
-
+
/** Returns an Accessible representing the specified selected child of the object */
public javax.accessibility.Accessible getAccessibleSelection(int i) {
try {
@@ -95,5 +95,5 @@ class AccessibleSelectionImpl implements javax.accessibility.AccessibleSelection
} catch (com.sun.star.uno.RuntimeException e) {
}
}
-
+
}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleStateAdapter.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleStateAdapter.java
index ea1979a545ed..36ed08466636 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleStateAdapter.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleStateAdapter.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
@@ -69,11 +69,11 @@ public class AccessibleStateAdapter {
AccessibleState.VERTICAL,
AccessibleState.VISIBLE
};
-
+
private static void printToplevelStateMessage(AccessibleState s, java.awt.Component c) {
System.err.println("*** ERROR *** " + s + " state is a toplevel window state " + c);
}
-
+
private static String getDisplayName(java.awt.Component c) {
javax.accessibility.Accessible a = (javax.accessibility.Accessible) c;
if( a != null) {
@@ -83,11 +83,11 @@ public class AccessibleStateAdapter {
return c.toString();
}
}
-
+
private static void printOutOfSyncMessage(AccessibleState s, java.awt.Component c, boolean enabled) {
System.err.println("*** ERROR *** " + s + " state out of sync (UNO state set: " + !enabled + ", Java component state: " + enabled + ") for " + getDisplayName(c));
}
-
+
public static AccessibleState getAccessibleState(Object any) {
try {
if (AnyConverter.isShort(any)) {
@@ -97,24 +97,24 @@ public class AccessibleStateAdapter {
} catch (com.sun.star.lang.IllegalArgumentException e) {
return null;
}
- }
-
+ }
+
public static AccessibleState getAccessibleState(short unoStateType) {
if (unoStateType > 0 && unoStateType < stateTypeMap.length) {
return stateTypeMap[unoStateType];
}
return null;
}
-
+
public static AccessibleStateSet getDefunctStateSet() {
AccessibleStateSet ass = new AccessibleStateSet();
ass.add(AccessibleExtendedState.DEFUNCT);
return ass;
}
-
+
public static void setComponentState(java.awt.Component c,
XAccessibleStateSet xAccessibleStateSet) {
-
+
try {
if (xAccessibleStateSet != null) {
// Set the boundings of the component if it is visible ..
@@ -132,28 +132,28 @@ public class AccessibleStateAdapter {
}
} catch (com.sun.star.uno.RuntimeException e) {
}
- }
+ }
public static AccessibleStateSet getAccessibleStateSet(java.awt.Component c,
XAccessibleStateSet xAccessibleStateSet) {
-
+
try {
if (xAccessibleStateSet != null) {
AccessibleStateSet as = new AccessibleStateSet();
short[] unoStateTypes = xAccessibleStateSet.getStates();
for (int i=0; i<unoStateTypes.length; i++) {
- if (unoStateTypes[i] > 0 &&
+ if (unoStateTypes[i] > 0 &&
unoStateTypes[i] < stateTypeMap.length) {
as.add(stateTypeMap[unoStateTypes[i]]);
}
}
-
+
// Note: COLLAPSED does not exists in the UAA.
if (as.contains(AccessibleState.EXPANDABLE) &&
! as.contains(AccessibleState.EXPANDED)) {
as.add(AccessibleState.COLLAPSED);
}
-
+
// Sync office and Java FOCUSED state
boolean isFocusInSync;
if (c.isFocusOwner()) {
@@ -161,8 +161,8 @@ public class AccessibleStateAdapter {
} else {
isFocusInSync = !as.remove(AccessibleState.FOCUSED);
}
-
- // Sync office and Java ACTIVE state
+
+ // Sync office and Java ACTIVE state
boolean isActiveInSync;
if (c instanceof java.awt.Window && ((java.awt.Window) c).isActive()) {
isActiveInSync = !as.add(AccessibleState.ACTIVE);
@@ -190,7 +190,7 @@ public class AccessibleStateAdapter {
if (as.contains(AccessibleState.VISIBLE) != c.isVisible()) {
printOutOfSyncMessage(AccessibleState.VISIBLE, c, c.isVisible());
}
-
+
// The following states are for toplevel windows only
if (! (c instanceof java.awt.Window)) {
if (as.contains(AccessibleState.ACTIVE)) {
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java
index c3bcbde2a71a..112b7744b867 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.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
@@ -52,7 +52,7 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText {
"ParaLeftMargin", "ParaLineSpacing", "ParaTopMargin", "ParaBottomMargin",
"CharStrikeout", "CharEscapement", "ParaTabStops", "CharUnderline"
};
-
+
final static String[] localeAttributeList = {
"CharLocale", "CharLocaleAsian", "CharLocaleComplex"
};
@@ -65,7 +65,7 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText {
/** Creates new GenericAccessibleEditableText object */
public AccessibleTextImpl(XAccessibleText xAccessibleText) {
-
+
if (Build.PRODUCT) {
unoObject = xAccessibleText;
} else {
@@ -77,13 +77,13 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText {
}
}
}
-
+
public AccessibleTextImpl() {
}
-
+
public static javax.accessibility.AccessibleText get(com.sun.star.uno.XInterface unoObject) {
try {
- XAccessibleText unoAccessibleText = (XAccessibleText)
+ XAccessibleText unoAccessibleText = (XAccessibleText)
UnoRuntime.queryInterface(XAccessibleText.class, unoObject);
if (unoAccessibleText != null) {
return new AccessibleTextImpl(unoAccessibleText);
@@ -96,7 +96,7 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText {
protected static Object convertTextSegment(Object any) {
try {
if (AnyConverter.isObject(any)) {
- TextSegment ts = (TextSegment)
+ TextSegment ts = (TextSegment)
AnyConverter.toObject(TextSegmentType, any);
if (ts != null) {
// Since there is nothing like a "range" object in the JAA yet,
@@ -108,7 +108,7 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText {
}
} catch (com.sun.star.lang.IllegalArgumentException e) {
}
-
+
return null;
}
@@ -126,9 +126,9 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText {
protected java.util.Locale getLocale(int index) {
try {
- com.sun.star.beans.PropertyValue[] propertyValues =
+ com.sun.star.beans.PropertyValue[] propertyValues =
unoObject.getCharacterAttributes(index, localeAttributeList);
-
+
if (null != propertyValues) {
for (int i = 0; i < propertyValues.length; i++) {
com.sun.star.lang.Locale unoLocale = (com.sun.star.lang.Locale)
@@ -146,11 +146,11 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText {
return java.util.Locale.getDefault();
}
}
+
-
- /** Returns the string after a given index
+ /** Returns the string after a given index
*
- * The Java word iterator has a different understanding of what
+ * The Java word iterator has a different understanding of what
* a word is than the word iterator used by OOo, so we use the
* Java iterators to ensure maximal compatibility with Java.
*/
@@ -185,7 +185,7 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText {
case AccessibleText.SENTENCE:
try {
String s = unoObject.getText();
- BreakIterator sentence =
+ BreakIterator sentence =
BreakIterator.getSentenceInstance(getLocale(index));
sentence.setText(s);
int start = sentence.following(index);
@@ -366,7 +366,7 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText {
(float) (toPointFactor * ls.Height));
}
}
- // FIXME: Java 1.4 NameAttribute, Orientation, ResolveAttribute
+ // FIXME: Java 1.4 NameAttribute, Orientation, ResolveAttribute
// Set space above attribute
else if (property.Name.equals("ParaTopMargin")) {
StyleConstants.setSpaceAbove(as,
@@ -497,7 +497,7 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText {
/** Returns the string before a given index
*
- * The Java word iterator has a different understanding of what
+ * The Java word iterator has a different understanding of what
* a word is than the word iterator used by OOo, so we use the
* Java iterators to ensure maximal compatibility with Java.
*/
@@ -530,7 +530,7 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText {
case AccessibleText.SENTENCE:
try {
String s = unoObject.getText();
- BreakIterator sentence =
+ BreakIterator sentence =
BreakIterator.getSentenceInstance(getLocale(index));
sentence.setText(s);
int end = sentence.following(index);
@@ -575,7 +575,7 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText {
/** Returns the string at a given index
*
- * The Java word iterator has a different understanding of what
+ * The Java word iterator has a different understanding of what
* a word is than the word iterator used by OOo, so we use the
* Java iterators to ensure maximal compatibility with Java.
*/
@@ -603,7 +603,7 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText {
case AccessibleText.SENTENCE:
try {
String s = unoObject.getText();
- BreakIterator sentence =
+ BreakIterator sentence =
BreakIterator.getSentenceInstance(getLocale(index));
sentence.setText(s);
int end = sentence.following(index);
@@ -635,7 +635,7 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText {
} catch (com.sun.star.lang.IllegalArgumentException e) {
return null;
}
-
+
default:
return null;
}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleValueImpl.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleValueImpl.java
index cabbf3f5d323..d386e9bcc942 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleValueImpl.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleValueImpl.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.uno.AnyConverter;
*/
public class AccessibleValueImpl implements javax.accessibility.AccessibleValue {
protected XAccessibleValue unoObject;
-
+
/** Creates new AccessibleValueImpl */
public AccessibleValueImpl(XAccessibleValue xAccessibleValue) {
unoObject = xAccessibleValue;
}
-
+
public static java.lang.Number toNumber(java.lang.Object any) {
try {
if(AnyConverter.isByte(any)) {
@@ -58,10 +58,10 @@ public class AccessibleValueImpl implements javax.accessibility.AccessibleValue
}
} catch (com.sun.star.lang.IllegalArgumentException e) {
}
-
+
return null;
}
-
+
public java.lang.Number getMinimumAccessibleValue() {
try {
return toNumber(unoObject.getMinimumValue());
@@ -69,7 +69,7 @@ public class AccessibleValueImpl implements javax.accessibility.AccessibleValue
return null;
}
}
-
+
public java.lang.Number getCurrentAccessibleValue() {
try {
return toNumber(unoObject.getCurrentValue());
@@ -77,7 +77,7 @@ public class AccessibleValueImpl implements javax.accessibility.AccessibleValue
return null;
}
}
-
+
public java.lang.Number getMaximumAccessibleValue() {
try {
return toNumber(unoObject.getMaximumValue());
@@ -85,7 +85,7 @@ public class AccessibleValueImpl implements javax.accessibility.AccessibleValue
return null;
}
}
-
+
public boolean setCurrentAccessibleValue(java.lang.Number number) {
try {
return unoObject.setCurrentValue(number);
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Alert.java b/accessibility/bridge/org/openoffice/java/accessibility/Alert.java
index e853fabecba0..158fb0d7c81c 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/Alert.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/Alert.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
@@ -24,22 +24,22 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
+
package org.openoffice.java.accessibility;
import javax.accessibility.AccessibleRole;
import com.sun.star.accessibility.*;
public class Alert extends Dialog {
-
+
protected Alert(java.awt.Frame owner, XAccessibleComponent xAccessibleComponent) {
super(owner, xAccessibleComponent);
}
-
+
protected Alert(java.awt.Frame owner, String name, XAccessibleComponent xAccessibleComponent) {
super(owner, name, xAccessibleComponent);
}
-
+
protected Alert(java.awt.Frame owner, String name, boolean modal, XAccessibleComponent xAccessibleComponent) {
super(owner, name, modal, xAccessibleComponent);
}
@@ -52,13 +52,13 @@ public class Alert extends Dialog {
}
return accessibleContext;
}
-
+
protected class AccessibleAlert extends AccessibleDialog {
-
+
protected AccessibleAlert() {
super();
}
-
+
public AccessibleRole getAccessibleRole() {
return AccessibleRole.ALERT;
}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Application.java b/accessibility/bridge/org/openoffice/java/accessibility/Application.java
index c67da714f4df..c16f30c37e40 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/Application.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/Application.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
@@ -31,13 +31,13 @@ import javax.accessibility.Accessible;
import javax.accessibility.AccessibleContext;
public class Application extends java.awt.Frame implements Accessible {
-
+
protected AccessibleContext accessibleContext = null;
-
+
protected Application() {
super();
}
-
+
public boolean isShowing() {
return true;
}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Button.java b/accessibility/bridge/org/openoffice/java/accessibility/Button.java
index 44bccc30ffc1..08cf7d7c67ca 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/Button.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/Button.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,21 +45,21 @@ class Button extends AbstractButton implements javax.accessibility.Accessible {
protected AccessibleButtonListener() {
super();
}
-
+
protected javax.accessibility.AccessibleContext getContext( Object any ) {
try {
- XAccessible xAccessible = (XAccessible)
+ XAccessible xAccessible = (XAccessible)
AnyConverter.toObject( AccessibleObjectFactory.XAccessibleType, any );
-
- javax.accessibility.Accessible accessible =
+
+ javax.accessibility.Accessible accessible =
(javax.accessibility.Accessible) Button.this.getComponent( xAccessible );
-
+
return accessible.getAccessibleContext();
} catch( com.sun.star.uno.Exception e ) {
return null;
}
}
-
+
/** Called by OpenOffice process to notify property changes */
public void notifyEvent(AccessibleEventObject event) {
switch (event.EventId) {
@@ -67,7 +67,7 @@ class Button extends AbstractButton implements javax.accessibility.Accessible {
java.awt.Component c = getComponent(unoAccessible);
Object values[] = { null, null };
-
+
if (AnyConverter.isObject(event.OldValue)) {
values[0] = getContext( event.OldValue );
}
@@ -85,7 +85,7 @@ class Button extends AbstractButton implements javax.accessibility.Accessible {
}
}
}
-
+
/** Creates the AccessibleContext associated with this object */
public javax.accessibility.AccessibleContext createAccessibleContext() {
return new AccessibleButton();
@@ -109,14 +109,14 @@ class Button extends AbstractButton implements javax.accessibility.Accessible {
return c;
}
-
+
protected class AccessibleButton extends AccessibleAbstractButton {
/** Gets the role of this object */
public javax.accessibility.AccessibleRole getAccessibleRole() {
return javax.accessibility.AccessibleRole.PUSH_BUTTON;
}
-
+
/** Returns the number of accessible children of the object */
public int getAccessibleChildrenCount() {
try {
@@ -135,7 +135,7 @@ class Button extends AbstractButton implements javax.accessibility.Accessible {
}
return null;
}
-
+
/*
* AccessibleComponent
*/
@@ -151,7 +151,7 @@ class Button extends AbstractButton implements javax.accessibility.Accessible {
return null;
}
}
-
+
}
}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/CheckBox.java b/accessibility/bridge/org/openoffice/java/accessibility/CheckBox.java
index 624dfd048c89..b7a401497d87 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/CheckBox.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/CheckBox.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
@@ -31,7 +31,7 @@ import com.sun.star.uno.*;
import com.sun.star.accessibility.*;
class CheckBox extends ToggleButton {
-
+
public CheckBox(XAccessible xAccessible, XAccessibleContext xAccessibleContext) {
super(xAccessible, xAccessibleContext);
}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/ComboBox.java b/accessibility/bridge/org/openoffice/java/accessibility/ComboBox.java
index 5f5cf4a34374..5f36ff42a450 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/ComboBox.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/ComboBox.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 @@ public class ComboBox extends Container {
/** Appends the specified component to the end of this container */
public java.awt.Component add(java.awt.Component c) {
- // List should be always the first child
+ // List should be always the first child
if (c instanceof List) {
return super.add(c, 0);
} else {
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Component.java b/accessibility/bridge/org/openoffice/java/accessibility/Component.java
index 21043e1f5098..5101080f9ab7 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/Component.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/Component.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,18 +36,18 @@ import com.sun.star.accessibility.*;
public abstract class Component extends java.awt.Component {
public static final Type RectangleType = new Type(com.sun.star.awt.Rectangle.class);
public static final Type SelectionType = new Type(com.sun.star.awt.Selection.class);
-
+
protected XAccessible unoAccessible;
protected XAccessibleContext unoAccessibleContext;
protected XAccessibleComponent unoAccessibleComponent;
-
+
protected boolean disposed = false;
-
+
protected Component(XAccessible xAccessible, XAccessibleContext xAccessibleContext) {
super();
unoAccessible = xAccessible;
unoAccessibleContext = xAccessibleContext;
- unoAccessibleComponent = (XAccessibleComponent)
+ unoAccessibleComponent = (XAccessibleComponent)
UnoRuntime.queryInterface(XAccessibleComponent.class, xAccessibleContext);
// Add the event listener right away, because the global focus notification doesn't
// work yet ..
@@ -58,10 +58,10 @@ public abstract class Component extends java.awt.Component {
broadcaster.addEventListener(createEventListener());
}
}
-
+
/**
- * Determines whether this <code>Component</code> is showing on screen.
- * This means that the component must be visible, and it must be in a
+ * Determines whether this <code>Component</code> is showing on screen.
+ * This means that the component must be visible, and it must be in a
* <code>container</code> that is visible and showing.
* @see #addNotify
* @see #removeNotify
@@ -74,10 +74,10 @@ public abstract class Component extends java.awt.Component {
}
return false;
}
-
+
/**
* Makes this <code>Component</code> displayable by connecting it to a
- * native screen resource.
+ * native screen resource.
* This method is called internally by the toolkit and should
* not be called directly by programs.
* @see #isDisplayable
@@ -86,10 +86,10 @@ public abstract class Component extends java.awt.Component {
*/
public void addNotify() {
}
-
- /**
+
+ /**
* Makes this <code>Component</code> undisplayable by destroying it native
- * screen resource.
+ * screen resource.
* This method is called by the toolkit internally and should
* not be called directly by programs.
* @see #isDisplayable
@@ -98,37 +98,37 @@ public abstract class Component extends java.awt.Component {
*/
public void removeNotify() {
}
-
+
/*
* Fake the java focus handling. This is necessary to keep OOo focus
* in sync with the java focus. See java.awt.DefaultKeyboardFocusManager
* for implementation details.
**/
-
+
/** Requests focus for this object */
public void requestFocus() {
}
-
+
/** Requests focus for this object */
public boolean requestFocus(boolean temporary) {
// Must be a no-op to make focus handling work
return true;
}
-
+
/** Requests the focus for this object in the containing window */
public boolean requestFocusInWindow() {
return requestFocusInWindow(false);
}
-
+
/** Requests the focus for this object in the containing window */
protected boolean requestFocusInWindow(boolean temporary) {
if (isFocusable() && isVisible()) {
- getEventQueue().postEvent(new java.awt.event.FocusEvent(this, java.awt.event.FocusEvent.FOCUS_GAINED, temporary));
+ getEventQueue().postEvent(new java.awt.event.FocusEvent(this, java.awt.event.FocusEvent.FOCUS_GAINED, temporary));
return true;
}
return false;
}
-
+
public Object[] getAccessibleComponents(Object[] targetSet) {
try {
java.util.ArrayList list = new java.util.ArrayList(targetSet.length);
@@ -145,22 +145,22 @@ public abstract class Component extends java.awt.Component {
return null;
}
}
-
+
protected java.awt.EventQueue getEventQueue() {
return java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue();
}
-
+
protected class PropertyChangeBroadcaster implements Runnable {
String propertyName;
Object oldValue;
Object newValue;
-
+
public PropertyChangeBroadcaster(String name, Object param1, Object param2) {
propertyName = name;
oldValue = param1;
newValue = param2;
}
-
+
public void run() {
// Because this code is executed in the DispatchThread, it is better to catch every
// exception that might occur
@@ -177,19 +177,19 @@ public abstract class Component extends java.awt.Component {
}
}
}
-
+
protected void firePropertyChange(String property, Object oldValue, Object newValue) {
getEventQueue().invokeLater(new PropertyChangeBroadcaster(property, oldValue, newValue));
}
-
+
protected void fireStatePropertyChange(AccessibleState state, boolean set) {
PropertyChangeBroadcaster broadcaster;
-
+
// if (Build.DEBUG) {
// System.err.println("[" + AccessibleRoleAdapter.getAccessibleRole(unoAccessibleContext.getAccessibleRole()) + "] " +
// unoAccessibleContext.getAccessibleName() + " is " + (set ? "now " : "no longer ") + state);
// }
-
+
if (set) {
broadcaster = new PropertyChangeBroadcaster(
accessibleContext.ACCESSIBLE_STATE_PROPERTY,
@@ -201,15 +201,15 @@ public abstract class Component extends java.awt.Component {
}
getEventQueue().invokeLater(broadcaster);
}
-
+
/**
* Update the proxy objects appropriatly on property change events
*/
protected class AccessibleUNOComponentListener implements XAccessibleEventListener {
-
+
protected AccessibleUNOComponentListener() {
}
-
+
protected void setComponentState(short state, boolean enable) {
switch (state) {
case AccessibleStateType.ACTIVE:
@@ -229,8 +229,8 @@ public abstract class Component extends java.awt.Component {
break;
case AccessibleStateType.FOCUSED:
getEventQueue().postEvent(new java.awt.event.FocusEvent(
- Component.this, enable ?
- java.awt.event.FocusEvent.FOCUS_GAINED :
+ Component.this, enable ?
+ java.awt.event.FocusEvent.FOCUS_GAINED :
java.awt.event.FocusEvent.FOCUS_LOST));
break;
case AccessibleStateType.PRESSED:
@@ -255,7 +255,7 @@ public abstract class Component extends java.awt.Component {
break;
}
}
-
+
/** Updates the accessible name and fires the appropriate PropertyChangedEvent */
protected void handleNameChangedEvent(Object any) {
try {
@@ -268,7 +268,7 @@ public abstract class Component extends java.awt.Component {
} catch (com.sun.star.lang.IllegalArgumentException e) {
}
}
-
+
/** Updates the accessible description and fires the appropriate PropertyChangedEvent */
protected void handleDescriptionChangedEvent(Object any) {
try {
@@ -281,26 +281,26 @@ public abstract class Component extends java.awt.Component {
} catch (com.sun.star.lang.IllegalArgumentException e) {
}
}
-
+
/** Updates the internal states and fires the appropriate PropertyChangedEvent */
protected void handleStateChangedEvent(Object any1, Object any2) {
try {
if (AnyConverter.isShort(any1)) {
setComponentState(AnyConverter.toShort(any1), false);
}
-
+
if (AnyConverter.isShort(any2)) {
setComponentState(AnyConverter.toShort(any2), true);
}
} catch (com.sun.star.lang.IllegalArgumentException e) {
}
}
-
+
/** Called by OpenOffice process to notify property changes */
public void notifyEvent(AccessibleEventObject event) {
-
+
if ( !disposed ) {
-
+
switch (event.EventId) {
case AccessibleEventId.ACTION_CHANGED:
firePropertyChange(accessibleContext.ACCESSIBLE_ACTION_PROPERTY,
@@ -331,7 +331,7 @@ public abstract class Component extends java.awt.Component {
break;
case AccessibleEventId.TEXT_CHANGED:
firePropertyChange(AccessibleContext.ACCESSIBLE_TEXT_PROPERTY,
- AccessibleTextImpl.convertTextSegment(event.OldValue),
+ AccessibleTextImpl.convertTextSegment(event.OldValue),
AccessibleTextImpl.convertTextSegment(event.NewValue));
break;
/*
@@ -354,20 +354,20 @@ public abstract class Component extends java.awt.Component {
}
}
}
-
+
/** Called by OpenOffice process to notify that the UNO component is disposing */
public void disposing(com.sun.star.lang.EventObject eventObject) {
disposed = true;
AccessibleObjectFactory.disposing(Component.this);
}
}
-
+
protected XAccessibleEventListener createEventListener() {
return new AccessibleUNOComponentListener();
}
-
+
protected javax.accessibility.AccessibleContext accessibleContext = null;
-
+
/** This method actually creates the AccessibleContext object returned by
* getAccessibleContext().
*/
@@ -381,7 +381,7 @@ public abstract class Component extends java.awt.Component {
try {
AccessibleContext ac = createAccessibleContext();
if (ac != null) {
- // Set accessible name and description here to avoid
+ // Set accessible name and description here to avoid
// unnecessary property change events later ..
ac.setAccessibleName(unoAccessibleContext.getAccessibleName());
ac.setAccessibleDescription(unoAccessibleContext.getAccessibleDescription());
@@ -392,12 +392,12 @@ public abstract class Component extends java.awt.Component {
}
return accessibleContext;
}
-
- protected abstract class AccessibleUNOComponent extends java.awt.Component.AccessibleAWTComponent
+
+ protected abstract class AccessibleUNOComponent extends java.awt.Component.AccessibleAWTComponent
implements javax.accessibility.AccessibleExtendedComponent {
-
+
protected java.awt.event.ComponentListener accessibleComponentHandler = null;
-
+
/**
* Fire PropertyChange listener, if one is registered,
* when shown/hidden..
@@ -408,22 +408,22 @@ public abstract class Component extends java.awt.Component {
AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
AccessibleState.VISIBLE, null);
}
-
+
public void componentShown(java.awt.event.ComponentEvent e) {
AccessibleUNOComponent.this.firePropertyChange(
AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
null, AccessibleState.VISIBLE);
}
-
+
public void componentMoved(java.awt.event.ComponentEvent e) {
}
-
+
public void componentResized(java.awt.event.ComponentEvent e) {
}
} // inner class AccessibleComponentHandler
-
+
protected java.awt.event.FocusListener accessibleFocusHandler = null;
-
+
/**
* Fire PropertyChange listener, if one is registered,
* when focus events happen
@@ -446,9 +446,9 @@ public abstract class Component extends java.awt.Component {
}
}
} // inner class AccessibleFocusHandler
-
+
protected int propertyChangeListenerCount = 0;
-
+
/**
* Add a PropertyChangeListener to the listener list.
*
@@ -458,13 +458,13 @@ public abstract class Component extends java.awt.Component {
if (propertyChangeListenerCount++ == 0) {
accessibleComponentHandler = new AccessibleComponentHandler();
Component.this.addComponentListener(accessibleComponentHandler);
-
+
accessibleFocusHandler = new AccessibleFocusHandler();
Component.this.addFocusListener(accessibleFocusHandler);
}
super.addPropertyChangeListener(listener);
}
-
+
/**
* Remove a PropertyChangeListener from the listener list.
* This removes a PropertyChangeListener that was registered
@@ -476,7 +476,7 @@ public abstract class Component extends java.awt.Component {
if (--propertyChangeListenerCount == 0) {
Component.this.removeComponentListener(accessibleComponentHandler);
accessibleComponentHandler = null;
-
+
Component.this.removeFocusListener(accessibleFocusHandler);
accessibleFocusHandler = null;
}
@@ -501,7 +501,7 @@ public abstract class Component extends java.awt.Component {
return AccessibleStateAdapter.getDefunctStateSet();
}
}
-
+
/** Gets the locale of the component */
public java.util.Locale getLocale() throws java.awt.IllegalComponentStateException {
try {
@@ -513,11 +513,11 @@ public abstract class Component extends java.awt.Component {
return java.util.Locale.getDefault();
}
}
-
+
/*
* AccessibleExtendedComponent
*/
-
+
/** Returns the background color of the object */
public java.awt.Color getBackground() {
try {
@@ -526,11 +526,11 @@ public abstract class Component extends java.awt.Component {
return null;
}
}
-
+
public void setBackground(java.awt.Color c) {
// Not supported by UNO accessibility API
}
-
+
/** Returns the foreground color of the object */
public java.awt.Color getForeground() {
try {
@@ -539,62 +539,62 @@ public abstract class Component extends java.awt.Component {
return null;
}
}
-
+
public void setForeground(java.awt.Color c) {
// Not supported by UNO accessibility API
}
-
+
public java.awt.Cursor getCursor() {
// Not supported by UNO accessibility API
return null;
}
-
+
public void setCursor(java.awt.Cursor cursor) {
// Not supported by UNO accessibility API
}
-
+
public java.awt.Font getFont() {
// FIXME
return null;
}
-
+
public void setFont(java.awt.Font f) {
// Not supported by UNO accessibility API
}
-
+
public java.awt.FontMetrics getFontMetrics(java.awt.Font f) {
// FIXME
return null;
}
-
+
public boolean isEnabled() {
return Component.this.isEnabled();
}
-
+
public void setEnabled(boolean b) {
// Not supported by UNO accessibility API
}
-
+
public boolean isVisible() {
return Component.this.isVisible();
}
-
+
public void setVisible(boolean b) {
// Not supported by UNO accessibility API
}
-
+
public boolean isShowing() {
return Component.this.isShowing();
}
-
+
public boolean contains(java.awt.Point p) {
try {
- return unoAccessibleComponent.containsPoint(new com.sun.star.awt.Point(p.x, p.y));
+ return unoAccessibleComponent.containsPoint(new com.sun.star.awt.Point(p.x, p.y));
} catch (com.sun.star.uno.RuntimeException e) {
return false;
}
}
-
+
/** Returns the location of the object on the screen. */
public java.awt.Point getLocationOnScreen() {
try {
@@ -607,68 +607,68 @@ public abstract class Component extends java.awt.Component {
return null;
}
}
-
+
/** Gets the location of this component in the form of a point specifying the component's top-left corner */
public java.awt.Point getLocation() {
try {
- com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocation();
+ com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocation();
return new java.awt.Point( unoPoint.X, unoPoint.Y );
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Moves this component to a new location */
public void setLocation(java.awt.Point p) {
// Not supported by UNO accessibility API
}
-
+
/** Gets the bounds of this component in the form of a Rectangle object */
public java.awt.Rectangle getBounds() {
try {
- com.sun.star.awt.Rectangle unoRect = unoAccessibleComponent.getBounds();
+ com.sun.star.awt.Rectangle unoRect = unoAccessibleComponent.getBounds();
return new java.awt.Rectangle(unoRect.X, unoRect.Y, unoRect.Width, unoRect.Height);
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Moves and resizes this component to conform to the new bounding rectangle r */
public void setBounds(java.awt.Rectangle r) {
// Not supported by UNO accessibility API
}
-
+
/** Returns the size of this component in the form of a Dimension object */
public java.awt.Dimension getSize() {
try {
- com.sun.star.awt.Size unoSize = unoAccessibleComponent.getSize();
+ com.sun.star.awt.Size unoSize = unoAccessibleComponent.getSize();
return new java.awt.Dimension(unoSize.Width, unoSize.Height);
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Resizes this component so that it has width d.width and height d.height */
public void setSize(java.awt.Dimension d) {
// Not supported by UNO accessibility API
}
-
+
public javax.accessibility.Accessible getAccessibleAt(java.awt.Point p) {
// Not supported by this implementation
return null;
}
-
+
public boolean isFocusTraversable() {
return Component.this.isFocusable();
}
-
+
public void requestFocus() {
unoAccessibleComponent.grabFocus();
}
-
+
public String getToolTipText() {
try {
- XAccessibleExtendedComponent unoAccessibleExtendedComponent = (XAccessibleExtendedComponent)
+ XAccessibleExtendedComponent unoAccessibleExtendedComponent = (XAccessibleExtendedComponent)
UnoRuntime.queryInterface(XAccessibleExtendedComponent.class, unoAccessibleComponent);
if (unoAccessibleExtendedComponent != null) {
return unoAccessibleExtendedComponent.getToolTipText();
@@ -678,10 +678,10 @@ public abstract class Component extends java.awt.Component {
}
return null;
}
-
+
public String getTitledBorderText() {
try {
- XAccessibleExtendedComponent unoAccessibleExtendedComponent = (XAccessibleExtendedComponent)
+ XAccessibleExtendedComponent unoAccessibleExtendedComponent = (XAccessibleExtendedComponent)
UnoRuntime.queryInterface(XAccessibleExtendedComponent.class, unoAccessibleComponent);
if (unoAccessibleExtendedComponent != null) {
return unoAccessibleExtendedComponent.getTitledBorderText();
@@ -691,10 +691,10 @@ public abstract class Component extends java.awt.Component {
}
return null;
}
-
+
public javax.accessibility.AccessibleKeyBinding getAccessibleKeyBinding() {
try {
- XAccessibleAction unoAccessibleAction = (XAccessibleAction)
+ XAccessibleAction unoAccessibleAction = (XAccessibleAction)
UnoRuntime.queryInterface(XAccessibleAction.class, unoAccessibleComponent);
if (unoAccessibleAction != null) {
XAccessibleKeyBinding unoAccessibleKeyBinding = unoAccessibleAction.getAccessibleActionKeyBinding(0);
@@ -710,7 +710,7 @@ public abstract class Component extends java.awt.Component {
return null;
}
}
-
+
// Extract a number from a UNO any
public static java.lang.Number toNumber(java.lang.Object any) {
try {
@@ -732,7 +732,7 @@ public abstract class Component extends java.awt.Component {
}
return null;
}
-
+
public String toString() {
return UnoRuntime.generateOid(unoAccessible);
}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Container.java b/accessibility/bridge/org/openoffice/java/accessibility/Container.java
index 257cdab8b757..b047075607ae 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/Container.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/Container.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
@@ -34,7 +34,7 @@ import com.sun.star.uno.*;
import com.sun.star.accessibility.*;
public class Container extends java.awt.Container implements javax.accessibility.Accessible {
-
+
protected XAccessible unoAccessible;
protected XAccessibleContext unoAccessibleContext;
protected XAccessibleComponent unoAccessibleComponent = null;
@@ -42,14 +42,14 @@ public class Container extends java.awt.Container implements javax.accessibility
protected javax.accessibility.AccessibleRole accessibleRole;
protected javax.accessibility.AccessibleText accessibleText;
protected boolean disposed = false;
-
+
protected Container(javax.accessibility.AccessibleRole role,
XAccessible xAccessible, XAccessibleContext xAccessibleContext) {
accessibleRole = role;
unoAccessible = xAccessible;
unoAccessibleContext = xAccessibleContext;
- unoAccessibleComponent = (XAccessibleComponent)
- UnoRuntime.queryInterface(XAccessibleComponent.class,
+ unoAccessibleComponent = (XAccessibleComponent)
+ UnoRuntime.queryInterface(XAccessibleComponent.class,
xAccessibleContext);
// Add the event listener right away, because the global focus notification doesn't
@@ -61,10 +61,10 @@ public class Container extends java.awt.Container implements javax.accessibility
broadcaster.addEventListener(createEventListener());
}
}
-
+
/**
- * Determines whether this <code>Container</code> is showing on screen.
- * This means that the component must be visible, and it must be in a
+ * Determines whether this <code>Container</code> is showing on screen.
+ * This means that the component must be visible, and it must be in a
* <code>container</code> that is visible and showing.
* @see #addNotify
* @see #removeNotify
@@ -77,10 +77,10 @@ public class Container extends java.awt.Container implements javax.accessibility
}
return false;
}
-
+
/**
* Makes this <code>Container</code> displayable by connecting it to a
- * native screen resource.
+ * native screen resource.
* This method is called internally by the toolkit and should
* not be called directly by programs.
* @see #isDisplayable
@@ -89,10 +89,10 @@ public class Container extends java.awt.Container implements javax.accessibility
*/
public void addNotify() {
}
-
- /**
+
+ /**
* Makes this <code>Container</code> undisplayable by destroying it native
- * screen resource.
+ * screen resource.
* This method is called by the toolkit internally and should
* not be called directly by programs.
* @see #isDisplayable
@@ -111,27 +111,27 @@ public class Container extends java.awt.Container implements javax.accessibility
/** Requests focus for this object */
public void requestFocus() {
}
-
+
/** Requests focus for this object */
public boolean requestFocus(boolean temporary) {
// Must be a no-op to make focus handling work
return true;
}
-
+
/** Requests the focus for this object in the containing window */
public boolean requestFocusInWindow() {
return requestFocusInWindow(false);
}
-
+
/** Requests the focus for this object in the containing window */
protected boolean requestFocusInWindow(boolean temporary) {
if (isFocusable() && isVisible()) {
- getEventQueue().postEvent(new java.awt.event.FocusEvent(this, java.awt.event.FocusEvent.FOCUS_GAINED, temporary));
+ getEventQueue().postEvent(new java.awt.event.FocusEvent(this, java.awt.event.FocusEvent.FOCUS_GAINED, temporary));
return true;
}
return false;
}
-
+
public Object[] getAccessibleComponents(Object[] targetSet) {
try {
java.util.ArrayList list = new java.util.ArrayList(targetSet.length);
@@ -148,22 +148,22 @@ public class Container extends java.awt.Container implements javax.accessibility
return null;
}
}
-
+
protected java.awt.EventQueue getEventQueue() {
return java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue();
}
-
+
protected class PropertyChangeBroadcaster implements Runnable {
String propertyName;
Object oldValue;
Object newValue;
-
+
public PropertyChangeBroadcaster(String name, Object param1, Object param2) {
propertyName = name;
oldValue = param1;
newValue = param2;
}
-
+
public void run() {
// Because this code is executed in the DispatchThread, it is better tocatch every
// exception that might occur
@@ -180,11 +180,11 @@ public class Container extends java.awt.Container implements javax.accessibility
}
}
}
-
+
protected void firePropertyChange(String property, Object oldValue, Object newValue) {
getEventQueue().invokeLater(new PropertyChangeBroadcaster(property, oldValue, newValue));
}
-
+
protected void fireStatePropertyChange(AccessibleState state, boolean set) {
PropertyChangeBroadcaster broadcaster;
if (set) {
@@ -198,19 +198,19 @@ public class Container extends java.awt.Container implements javax.accessibility
}
getEventQueue().invokeLater(broadcaster);
}
-
+
/**
* Update the proxy objects appropriatly on property change events
*/
protected class AccessibleContainerListener implements XAccessibleEventListener {
-
+
protected AccessibleContainerListener() {
}
-
+
protected java.awt.EventQueue getEventQueue() {
return java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue();
}
-
+
protected void setComponentState(short state, boolean enable) {
switch (state) {
case AccessibleStateType.ACTIVE:
@@ -224,8 +224,8 @@ public class Container extends java.awt.Container implements javax.accessibility
break;
case AccessibleStateType.FOCUSED:
getEventQueue().postEvent(new java.awt.event.FocusEvent(
- Container.this, enable ?
- java.awt.event.FocusEvent.FOCUS_GAINED :
+ Container.this, enable ?
+ java.awt.event.FocusEvent.FOCUS_GAINED :
java.awt.event.FocusEvent.FOCUS_LOST));
break;
case AccessibleStateType.SELECTED:
@@ -257,7 +257,7 @@ public class Container extends java.awt.Container implements javax.accessibility
} catch (com.sun.star.lang.IllegalArgumentException e) {
}
}
-
+
/** Updates the accessible description and fires the appropriate PropertyChangedEvent */
protected void handleDescriptionChangedEvent(Object any) {
try {
@@ -270,21 +270,21 @@ public class Container extends java.awt.Container implements javax.accessibility
} catch (com.sun.star.lang.IllegalArgumentException e) {
}
}
-
+
/** Updates the internal states and fires the appropriate PropertyChangedEvent */
protected void handleStateChangedEvent(Object any1, Object any2) {
try {
if (AnyConverter.isShort(any1)) {
setComponentState(AnyConverter.toShort(any1), false);
}
-
+
if (AnyConverter.isShort(any2)) {
setComponentState(AnyConverter.toShort(any2), true);
}
} catch (com.sun.star.lang.IllegalArgumentException e) {
}
}
-
+
/* This event is only necessary because some objects in the office don't know their parent
* and are therefor unable to revoke and re-insert themselves.
*/
@@ -293,15 +293,15 @@ public class Container extends java.awt.Container implements javax.accessibility
if (parent != null) {
javax.accessibility.AccessibleContext parentAC = parent.getAccessibleContext();
if (parentAC != null) {
-
+
parentAC.firePropertyChange(
javax.accessibility.AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
Container.this,
null);
-
- AccessibleObjectFactory.clearContainer(Container.this);
+
+ AccessibleObjectFactory.clearContainer(Container.this);
AccessibleObjectFactory.populateContainer(Container.this, unoAccessibleContext);
-
+
parentAC.firePropertyChange(
javax.accessibility.AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
null,
@@ -309,12 +309,12 @@ public class Container extends java.awt.Container implements javax.accessibility
}
}
}
-
+
/** Called by OpenOffice process to notify property changes */
public void notifyEvent(AccessibleEventObject event) {
-
+
if ( !disposed ) {
-
+
switch (event.EventId) {
case AccessibleEventId.NAME_CHANGED:
// Set the accessible name for the corresponding context, which will fire a property
@@ -332,7 +332,7 @@ public class Container extends java.awt.Container implements javax.accessibility
break;
case AccessibleEventId.TEXT_CHANGED:
firePropertyChange(AccessibleContext.ACCESSIBLE_TEXT_PROPERTY,
- AccessibleTextImpl.convertTextSegment(event.OldValue),
+ AccessibleTextImpl.convertTextSegment(event.OldValue),
AccessibleTextImpl.convertTextSegment(event.NewValue));
break;
case AccessibleEventId.CHILD:
@@ -365,20 +365,20 @@ public class Container extends java.awt.Container implements javax.accessibility
}
}
}
-
+
/** Called by OpenOffice process to notify that the UNO component is disposing */
public void disposing(com.sun.star.lang.EventObject eventObject) {
disposed = true;
AccessibleObjectFactory.disposing(Container.this);
}
}
-
+
protected XAccessibleEventListener createEventListener() {
return new AccessibleContainerListener();
}
-
+
protected javax.accessibility.AccessibleContext accessibleContext = null;
-
+
/** This method actually creates the AccessibleContext object returned by
* getAccessibleContext().
*/
@@ -392,7 +392,7 @@ public class Container extends java.awt.Container implements javax.accessibility
try {
AccessibleContext ac = createAccessibleContext();
if (ac != null) {
- // Set accessible name and description here to avoid
+ // Set accessible name and description here to avoid
// unnecessary property change events later ..
ac.setAccessibleName(unoAccessibleContext.getAccessibleName());
ac.setAccessibleDescription(unoAccessibleContext.getAccessibleDescription());
@@ -403,11 +403,11 @@ public class Container extends java.awt.Container implements javax.accessibility
}
return accessibleContext;
}
-
- protected class AccessibleContainer extends java.awt.Container.AccessibleAWTContainer {
+
+ protected class AccessibleContainer extends java.awt.Container.AccessibleAWTContainer {
protected AccessibleContainer() {
- /* Since getAccessibleText() is heavily used by the java access
+ /* Since getAccessibleText() is heavily used by the java access
* bridge for gnome and the gnome at-tools, we do a query interface
* here and remember the result.
*/
@@ -416,13 +416,13 @@ public class Container extends java.awt.Container implements javax.accessibility
protected AccessibleContainer(boolean query) {
/* This constructor is explicitly for subclasses that implement
- * AccessibleHypertext and therefor the default constructor would
+ * AccessibleHypertext and therefor the default constructor would
* bring unnecessary overhead.
*/
}
-
+
protected java.awt.event.ComponentListener accessibleComponentHandler = null;
-
+
/**
* Fire PropertyChange listener, if one is registered,
* when shown/hidden..
@@ -433,22 +433,22 @@ public class Container extends java.awt.Container implements javax.accessibility
AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
AccessibleState.VISIBLE, null);
}
-
+
public void componentShown(java.awt.event.ComponentEvent e) {
AccessibleContainer.this.firePropertyChange(
AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
null, AccessibleState.VISIBLE);
}
-
+
public void componentMoved(java.awt.event.ComponentEvent e) {
}
-
+
public void componentResized(java.awt.event.ComponentEvent e) {
}
} // inner class AccessibleContainerHandler
-
+
protected java.awt.event.FocusListener accessibleFocusHandler = null;
-
+
/**
* Fire PropertyChange listener, if one is registered,
* when focus events happen
@@ -471,20 +471,20 @@ public class Container extends java.awt.Container implements javax.accessibility
}
}
} // inner class AccessibleFocusHandler
-
+
protected java.awt.event.ContainerListener accessibleContainerHandler = null;
-
+
/**
* Fire PropertyChange listener, if one is registered,
* when children added/removed.
*/
-
+
protected class AccessibleContainerHandler implements java.awt.event.ContainerListener {
public void componentAdded(java.awt.event.ContainerEvent e) {
java.awt.Component c = e.getChild();
if (c != null && c instanceof javax.accessibility.Accessible) {
AccessibleContainer.this.firePropertyChange(
- AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
+ AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
null, ((javax.accessibility.Accessible) c).getAccessibleContext());
}
}
@@ -492,14 +492,14 @@ public class Container extends java.awt.Container implements javax.accessibility
java.awt.Component c = e.getChild();
if (c != null && c instanceof javax.accessibility.Accessible) {
AccessibleContainer.this.firePropertyChange(
- AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
- ((javax.accessibility.Accessible) c).getAccessibleContext(), null);
+ AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
+ ((javax.accessibility.Accessible) c).getAccessibleContext(), null);
}
}
}
-
+
protected int propertyChangeListenerCount = 0;
-
+
/**
* Add a PropertyChangeListener to the listener list.
*
@@ -509,16 +509,16 @@ public class Container extends java.awt.Container implements javax.accessibility
if (propertyChangeListenerCount++ == 0) {
accessibleFocusHandler = new AccessibleFocusHandler();
Container.this.addFocusListener(accessibleFocusHandler);
-
+
accessibleContainerHandler = new AccessibleContainerHandler();
Container.this.addContainerListener(accessibleContainerHandler);
-
+
accessibleComponentHandler = new AccessibleComponentHandler();
Container.this.addComponentListener(accessibleComponentHandler);
}
super.addPropertyChangeListener(listener);
}
-
+
/**
* Remove a PropertyChangeListener from the listener list.
* This removes a PropertyChangeListener that was registered
@@ -530,30 +530,30 @@ public class Container extends java.awt.Container implements javax.accessibility
if (--propertyChangeListenerCount == 0) {
Container.this.removeComponentListener(accessibleComponentHandler);
accessibleComponentHandler = null;
-
+
Container.this.removeContainerListener(accessibleContainerHandler);
accessibleContainerHandler = null;
-
+
Container.this.removeFocusListener(accessibleFocusHandler);
accessibleFocusHandler = null;
}
super.removePropertyChangeListener(listener);
}
-
+
/** Gets the role of this object */
public javax.accessibility.AccessibleRole getAccessibleRole() {
return accessibleRole;
}
-
+
/** Gets the AccessibleText associated with this object presenting text on the display */
public javax.accessibility.AccessibleText getAccessibleText() {
-
+
if (disposed)
return null;
-
+
return accessibleText;
}
-
+
/**
* Gets the current state set of this object.
*
@@ -572,21 +572,21 @@ public class Container extends java.awt.Container implements javax.accessibility
return AccessibleStateAdapter.getDefunctStateSet();
}
}
-
+
/** Returns the AccessibleSelection interface for this object */
public javax.accessibility.AccessibleSelection getAccessibleSelection() {
try {
- XAccessibleSelection unoAccessibleSelection = (XAccessibleSelection)
+ XAccessibleSelection unoAccessibleSelection = (XAccessibleSelection)
UnoRuntime.queryInterface(XAccessibleSelection.class, unoAccessibleContext);
if (unoAccessibleSelection != null) {
return new AccessibleSelectionImpl(unoAccessibleSelection);
}
} catch (com.sun.star.uno.RuntimeException e) {
}
-
+
return null;
}
-
+
/** Gets the locale of the component */
public java.util.Locale getLocale() throws java.awt.IllegalComponentStateException {
try {
@@ -598,11 +598,11 @@ public class Container extends java.awt.Container implements javax.accessibility
return super.getLocale();
}
}
-
+
/*
* AccessibleComponent
*/
-
+
/** Returns the background color of the object */
public java.awt.Color getBackground() {
try {
@@ -611,11 +611,11 @@ public class Container extends java.awt.Container implements javax.accessibility
return null;
}
}
-
+
public void setBackground(java.awt.Color c) {
// Not supported by UNO accessibility API
}
-
+
/** Returns the foreground color of the object */
public java.awt.Color getForeground() {
try {
@@ -624,138 +624,138 @@ public class Container extends java.awt.Container implements javax.accessibility
return null;
}
}
-
+
public void setForeground(java.awt.Color c) {
// Not supported by UNO accessibility API
}
-
+
public java.awt.Cursor getCursor() {
// Not supported by UNO accessibility API
return null;
}
-
+
public void setCursor(java.awt.Cursor cursor) {
// Not supported by UNO accessibility API
}
-
+
public java.awt.Font getFont() {
// FIXME
return null;
}
-
+
public void setFont(java.awt.Font f) {
// Not supported by UNO accessibility API
}
-
+
public java.awt.FontMetrics getFontMetrics(java.awt.Font f) {
// FIXME
return null;
}
-
+
public boolean isEnabled() {
return Container.this.isEnabled();
}
-
+
public void setEnabled(boolean b) {
// Not supported by UNO accessibility API
}
-
+
public boolean isVisible() {
return Container.this.isVisible();
}
-
+
public void setVisible(boolean b) {
// Not supported by UNO accessibility API
}
-
+
public boolean isShowing() {
return Container.this.isShowing();
}
-
+
public boolean contains(java.awt.Point p) {
try {
- return unoAccessibleComponent.containsPoint(new com.sun.star.awt.Point(p.x, p.y));
+ return unoAccessibleComponent.containsPoint(new com.sun.star.awt.Point(p.x, p.y));
} catch (com.sun.star.uno.RuntimeException e) {
return false;
}
}
-
+
/** Returns the location of the object on the screen. */
public java.awt.Point getLocationOnScreen() {
try {
- com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocationOnScreen();
+ com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocationOnScreen();
return new java.awt.Point(unoPoint.X, unoPoint.Y);
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Gets the location of this component in the form of a point specifying the component's top-left corner */
public java.awt.Point getLocation() {
try {
- com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocation();
+ com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocation();
return new java.awt.Point( unoPoint.X, unoPoint.Y );
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Moves this component to a new location */
public void setLocation(java.awt.Point p) {
// Not supported by UNO accessibility API
}
-
+
/** Gets the bounds of this component in the form of a Rectangle object */
public java.awt.Rectangle getBounds() {
try {
- com.sun.star.awt.Rectangle unoRect = unoAccessibleComponent.getBounds();
+ com.sun.star.awt.Rectangle unoRect = unoAccessibleComponent.getBounds();
return new java.awt.Rectangle(unoRect.X, unoRect.Y, unoRect.Width, unoRect.Height);
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Moves and resizes this component to conform to the new bounding rectangle r */
public void setBounds(java.awt.Rectangle r) {
// Not supported by UNO accessibility API
}
-
+
/** Returns the size of this component in the form of a Dimension object */
public java.awt.Dimension getSize() {
try {
- com.sun.star.awt.Size unoSize = unoAccessibleComponent.getSize();
+ com.sun.star.awt.Size unoSize = unoAccessibleComponent.getSize();
return new java.awt.Dimension(unoSize.Width, unoSize.Height);
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Resizes this component so that it has width d.width and height d.height */
public void setSize(java.awt.Dimension d) {
// Not supported by UNO accessibility API
}
- /** Returns the Accessible child, if one exists, contained at the local coordinate Point */
+ /** Returns the Accessible child, if one exists, contained at the local coordinate Point */
public javax.accessibility.Accessible getAccessibleAt(java.awt.Point p) {
try {
java.awt.Component c = AccessibleObjectFactory.getAccessibleComponent(
unoAccessibleComponent.getAccessibleAtPoint(new com.sun.star.awt.Point(p.x, p.y)));
-
+
return (javax.accessibility.Accessible) c;
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
public boolean isFocusTraversable() {
return Container.this.isFocusable();
}
-
+
public void requestFocus() {
unoAccessibleComponent.grabFocus();
}
}
-
+
public String toString() {
return UnoRuntime.generateOid(unoAccessible);
}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/DescendantManager.java b/accessibility/bridge/org/openoffice/java/accessibility/DescendantManager.java
index 5b8c45b716b4..039eea34ddcb 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/DescendantManager.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/DescendantManager.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/bridge/org/openoffice/java/accessibility/Dialog.java b/accessibility/bridge/org/openoffice/java/accessibility/Dialog.java
index dcb067368996..64b5572a2fcc 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/Dialog.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/Dialog.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
@@ -34,28 +34,28 @@ import com.sun.star.accessibility.*;
public class Dialog extends java.awt.Dialog implements javax.accessibility.Accessible, NativeFrame {
protected XAccessibleComponent unoAccessibleComponent;
-
+
boolean opened = false;
boolean visible = false;
boolean active = false;
-
+
java.awt.EventQueue eventQueue = null;
-
+
protected Dialog(java.awt.Frame owner, XAccessibleComponent xAccessibleComponent) {
super(owner);
initialize(xAccessibleComponent);
}
-
+
protected Dialog(java.awt.Frame owner, String name, XAccessibleComponent xAccessibleComponent) {
super(owner, name);
initialize(xAccessibleComponent);
}
-
+
protected Dialog(java.awt.Frame owner, String name, boolean modal, XAccessibleComponent xAccessibleComponent) {
super(owner, name, modal);
initialize(xAccessibleComponent);
}
-
+
private void initialize(XAccessibleComponent xAccessibleComponent) {
unoAccessibleComponent = xAccessibleComponent;
eventQueue = java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue();
@@ -66,24 +66,24 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces
broadcaster.addEventListener(new AccessibleDialogListener());
}
}
-
+
java.awt.Component initialComponent = null;
-
+
public java.awt.Component getInitialComponent() {
return initialComponent;
}
-
+
public void setInitialComponent(java.awt.Component c) {
initialComponent = c;
}
-
+
public Integer getHWND() {
return null;
}
-
+
/**
- * Determines whether this <code>Component</code> is showing on screen.
- * This means that the component must be visible, and it must be in a
+ * Determines whether this <code>Component</code> is showing on screen.
+ * This means that the component must be visible, and it must be in a
* <code>container</code> that is visible and showing.
* @see #addNotify
* @see #removeNotify
@@ -96,10 +96,10 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces
}
return false;
}
-
+
/**
* Makes this <code>Component</code> displayable by connecting it to a
- * native screen resource.
+ * native screen resource.
* This method is called internally by the toolkit and should
* not be called directly by programs.
* @see #isDisplayable
@@ -109,10 +109,10 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces
public void addNotify() {
// createHierarchyEvents(0, null, null, 0, false);
}
-
- /**
+
+ /**
* Makes this <code>Component</code> undisplayable by destroying it native
- * screen resource.
+ * screen resource.
* This method is called by the toolkit internally and should
* not be called directly by programs.
* @see #isDisplayable
@@ -121,7 +121,7 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces
*/
public void removeNotify() {
}
-
+
/**
* Determines if the object is visible. Note: this means that the
* object intends to be visible; however, it may not in fact be
@@ -134,7 +134,7 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces
public boolean isVisible(){
return visible;
}
-
+
/**
* Shows or hides this component depending on the value of parameter
* <code>b</code>.
@@ -158,28 +158,28 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces
}
}
}
-
+
public void dispose() {
setVisible(false);
postWindowEvent(java.awt.event.WindowEvent.WINDOW_CLOSED);
}
-
+
protected void postWindowEvent(int i) {
eventQueue.postEvent(new java.awt.event.WindowEvent(this, i));
}
-
+
protected void postComponentEvent(int i) {
eventQueue.postEvent(new java.awt.event.ComponentEvent(this, i));
}
-
+
/**
* Update the proxy objects appropriatly on property change events
*/
protected class AccessibleDialogListener implements XAccessibleEventListener {
-
+
protected AccessibleDialogListener() {
}
-
+
protected void setComponentState(short state, boolean enable) {
switch (state) {
case AccessibleStateType.ACTIVE:
@@ -191,8 +191,8 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces
}
break;
case AccessibleStateType.ICONIFIED:
- postWindowEvent(enable ?
- java.awt.event.WindowEvent.WINDOW_ICONIFIED :
+ postWindowEvent(enable ?
+ java.awt.event.WindowEvent.WINDOW_ICONIFIED :
java.awt.event.WindowEvent.WINDOW_DEICONIFIED);
break;
case AccessibleStateType.VISIBLE:
@@ -205,7 +205,7 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces
break;
}
}
-
+
/** Updates the accessible name and fires the appropriate PropertyChangedEvent */
protected void handleNameChangedEvent(Object any) {
try {
@@ -221,7 +221,7 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces
} catch (com.sun.star.lang.IllegalArgumentException e) {
}
}
-
+
/** Updates the accessible description and fires the appropriate PropertyChangedEvent */
protected void handleDescriptionChangedEvent(Object any) {
try {
@@ -235,21 +235,21 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces
} catch (com.sun.star.lang.IllegalArgumentException e) {
}
}
-
+
/** Updates the internal states and fires the appropriate PropertyChangedEvent */
protected void handleStateChangedEvent(Object any1, Object any2) {
try {
if (AnyConverter.isShort(any1)) {
setComponentState(AnyConverter.toShort(any1), false);
}
-
+
if (AnyConverter.isShort(any2)) {
setComponentState(AnyConverter.toShort(any2), true);
}
} catch (com.sun.star.lang.IllegalArgumentException e) {
}
}
-
+
/** Fires a visible data property change event */
protected void handleVisibleDataEvent() {
javax.accessibility.AccessibleContext ac = accessibleContext;
@@ -257,7 +257,7 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces
ac.firePropertyChange(javax.accessibility.AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null);
}
}
-
+
/** Called by OpenOffice process to notify property changes */
public void notifyEvent(AccessibleEventObject event) {
switch (event.EventId) {
@@ -293,14 +293,14 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces
}
}
}
-
+
/** Called by OpenOffice process to notify that the UNO component is disposing */
public void disposing(com.sun.star.lang.EventObject eventObject) {
}
}
-
+
javax.accessibility.AccessibleContext accessibleContext = null;
-
+
/** Returns the AccessibleContext associated with this object */
public javax.accessibility.AccessibleContext getAccessibleContext() {
if (accessibleContext == null) {
@@ -309,14 +309,14 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces
}
return accessibleContext;
}
-
+
protected class AccessibleDialog extends java.awt.Dialog.AccessibleAWTDialog {
protected AccessibleDialog() {
super();
}
-
+
protected java.awt.event.ComponentListener accessibleComponentHandler = null;
-
+
/**
* Fire PropertyChange listener, if one is registered,
* when shown/hidden..
@@ -327,22 +327,22 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces
javax.accessibility.AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
javax.accessibility.AccessibleState.VISIBLE, null);
}
-
+
public void componentShown(java.awt.event.ComponentEvent e) {
AccessibleDialog.this.firePropertyChange(
javax.accessibility.AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
null, javax.accessibility.AccessibleState.VISIBLE);
}
-
+
public void componentMoved(java.awt.event.ComponentEvent e) {
}
-
+
public void componentResized(java.awt.event.ComponentEvent e) {
}
} // inner class AccessibleComponentHandler
-
+
protected java.awt.event.WindowListener accessibleWindowHandler = null;
-
+
/**
* Fire PropertyChange listener, if one is registered,
* when window events happen
@@ -357,21 +357,21 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces
System.err.println("[Dialog] " + getTitle() + " is now active");
}
}
-
+
/** Invoked when a window has been closed as the result of calling dispose on the window. */
public void windowClosed(java.awt.event.WindowEvent e) {
if (Build.DEBUG) {
System.err.println("[Dialog] " + getTitle() + " has been closed");
}
}
-
+
/** Invoked when the user attempts to close the window from the window's system menu. */
public void windowClosing(java.awt.event.WindowEvent e) {
if (Build.DEBUG) {
System.err.println("[Dialog] " + getTitle() + " is closing");
}
}
-
+
/** Invoked when a Window is no longer the active Window. */
public void windowDeactivated(java.awt.event.WindowEvent e) {
AccessibleDialog.this.firePropertyChange(
@@ -381,43 +381,43 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces
System.err.println("[Dialog] " + getTitle() + " is no longer active");
}
}
-
+
/** Invoked when a window is changed from a minimized to a normal state. */
public void windowDeiconified(java.awt.event.WindowEvent e) {
if (Build.DEBUG) {
System.err.println("[Dialog] " + getTitle() + " has been deiconified");
}
}
-
+
/** Invoked when a window is changed from a normal to a minimized state. */
public void windowIconified(java.awt.event.WindowEvent e) {
if (Build.DEBUG) {
System.err.println("[Dialog] " + getTitle() + " has been iconified");
}
}
-
+
/** Invoked the first time a window is made visible. */
public void windowOpened(java.awt.event.WindowEvent e) {
if (Build.DEBUG) {
System.err.println("[Dialog] " + getTitle() + " has been opened");
}
}
-
+
} // inner class AccessibleWindowHandler
-
+
protected java.awt.event.ContainerListener accessibleContainerHandler = null;
-
+
/**
* Fire PropertyChange listener, if one is registered,
* when children added/removed.
*/
-
+
protected class AccessibleContainerHandler implements java.awt.event.ContainerListener {
public void componentAdded(java.awt.event.ContainerEvent e) {
java.awt.Component c = e.getChild();
if (c != null && c instanceof javax.accessibility.Accessible) {
AccessibleDialog.this.firePropertyChange(
- javax.accessibility.AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
+ javax.accessibility.AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
null, ((javax.accessibility.Accessible) c).getAccessibleContext());
}
}
@@ -425,14 +425,14 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces
java.awt.Component c = e.getChild();
if (c != null && c instanceof javax.accessibility.Accessible) {
AccessibleDialog.this.firePropertyChange(
- javax.accessibility.AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
- ((javax.accessibility.Accessible) c).getAccessibleContext(), null);
+ javax.accessibility.AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
+ ((javax.accessibility.Accessible) c).getAccessibleContext(), null);
}
}
}
-
+
protected int propertyChangeListenerCount = 0;
-
+
/**
* Add a PropertyChangeListener to the listener list.
*
@@ -442,16 +442,16 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces
if (propertyChangeListenerCount++ == 0) {
accessibleWindowHandler = new AccessibleWindowHandler();
Dialog.this.addWindowListener(accessibleWindowHandler);
-
+
accessibleContainerHandler = new AccessibleContainerHandler();
Dialog.this.addContainerListener(accessibleContainerHandler);
-
+
accessibleComponentHandler = new AccessibleComponentHandler();
Dialog.this.addComponentListener(accessibleComponentHandler);
}
super.addPropertyChangeListener(listener);
}
-
+
/**
* Remove a PropertyChangeListener from the listener list.
* This removes a PropertyChangeListener that was registered
@@ -463,20 +463,20 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces
if (--propertyChangeListenerCount == 0) {
Dialog.this.removeComponentListener(accessibleComponentHandler);
accessibleComponentHandler = null;
-
+
Dialog.this.removeContainerListener(accessibleContainerHandler);
accessibleContainerHandler = null;
-
+
Dialog.this.removeWindowListener(accessibleWindowHandler);
accessibleWindowHandler = null;
}
super.removePropertyChangeListener(listener);
}
-
+
/*
* AccessibleComponent
*/
-
+
/** Returns the background color of the object */
public java.awt.Color getBackground() {
try {
@@ -485,11 +485,11 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces
return null;
}
}
-
+
public void setBackground(java.awt.Color c) {
// Not supported by UNO accessibility API
}
-
+
/** Returns the foreground color of the object */
public java.awt.Color getForeground() {
try {
@@ -498,118 +498,118 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces
return null;
}
}
-
+
public void setForeground(java.awt.Color c) {
// Not supported by UNO accessibility API
}
-
+
public java.awt.Cursor getCursor() {
// Not supported by UNO accessibility API
return null;
}
-
+
public void setCursor(java.awt.Cursor cursor) {
// Not supported by UNO accessibility API
}
-
+
public java.awt.Font getFont() {
// FIXME
return null;
}
-
+
public void setFont(java.awt.Font f) {
// Not supported by UNO accessibility API
}
-
+
public java.awt.FontMetrics getFontMetrics(java.awt.Font f) {
// FIXME
return null;
}
-
+
public boolean isEnabled() {
return Dialog.this.isEnabled();
}
-
+
public void setEnabled(boolean b) {
// Not supported by UNO accessibility API
}
-
+
public boolean isVisible() {
return Dialog.this.isVisible();
}
-
+
public void setVisible(boolean b) {
// Not supported by UNO accessibility API
}
-
+
public boolean isShowing() {
return Dialog.this.isShowing();
}
-
+
public boolean contains(java.awt.Point p) {
try {
- return unoAccessibleComponent.containsPoint(new com.sun.star.awt.Point(p.x, p.y));
+ return unoAccessibleComponent.containsPoint(new com.sun.star.awt.Point(p.x, p.y));
} catch (com.sun.star.uno.RuntimeException e) {
return false;
}
}
-
+
/** Returns the location of the object on the screen. */
public java.awt.Point getLocationOnScreen() {
try {
- com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocationOnScreen();
+ com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocationOnScreen();
return new java.awt.Point(unoPoint.X, unoPoint.Y);
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Gets the location of this component in the form of a point specifying the component's top-left corner */
public java.awt.Point getLocation() {
try {
- com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocation();
+ com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocation();
return new java.awt.Point( unoPoint.X, unoPoint.Y );
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Moves this component to a new location */
public void setLocation(java.awt.Point p) {
// Not supported by UNO accessibility API
}
-
+
/** Gets the bounds of this component in the form of a Rectangle object */
public java.awt.Rectangle getBounds() {
try {
- com.sun.star.awt.Rectangle unoRect = unoAccessibleComponent.getBounds();
+ com.sun.star.awt.Rectangle unoRect = unoAccessibleComponent.getBounds();
return new java.awt.Rectangle(unoRect.X, unoRect.Y, unoRect.Width, unoRect.Height);
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Moves and resizes this component to conform to the new bounding rectangle r */
public void setBounds(java.awt.Rectangle r) {
// Not supported by UNO accessibility API
}
-
+
/** Returns the size of this component in the form of a Dimension object */
public java.awt.Dimension getSize() {
try {
- com.sun.star.awt.Size unoSize = unoAccessibleComponent.getSize();
+ com.sun.star.awt.Size unoSize = unoAccessibleComponent.getSize();
return new java.awt.Dimension(unoSize.Width, unoSize.Height);
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Resizes this component so that it has width d.width and height d.height */
public void setSize(java.awt.Dimension d) {
// Not supported by UNO accessibility API
}
-
- /** Returns the Accessible child, if one exists, contained at the local coordinate Point */
+
+ /** Returns the Accessible child, if one exists, contained at the local coordinate Point */
public javax.accessibility.Accessible getAccessibleAt(java.awt.Point p) {
try {
java.awt.Component c = AccessibleObjectFactory.getAccessibleComponent(
@@ -620,11 +620,11 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces
return null;
}
}
-
+
public boolean isFocusTraversable() {
return Dialog.this.isFocusable();
}
-
+
public void requestFocus() {
unoAccessibleComponent.grabFocus();
}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/FocusTraversalPolicy.java b/accessibility/bridge/org/openoffice/java/accessibility/FocusTraversalPolicy.java
index 75f6c91354f4..0f1c03c94653 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/FocusTraversalPolicy.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/FocusTraversalPolicy.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,17 +42,17 @@ public class FocusTraversalPolicy extends java.awt.FocusTraversalPolicy {
}
/** Returns the Component that should receive the focus after aComponent */
- public java.awt.Component getComponentAfter(java.awt.Container focusCycleRoot,
+ public java.awt.Component getComponentAfter(java.awt.Container focusCycleRoot,
java.awt.Component aComponent) {
return null;
}
-
+
/** Returns the Component that should receive the focus before aComponent */
- public java.awt.Component getComponentBefore(java.awt.Container focusCycleRoot,
+ public java.awt.Component getComponentBefore(java.awt.Container focusCycleRoot,
java.awt.Component aComponent) {
return null;
}
-
+
/** Returns the default Component to focus */
public java.awt.Component getDefaultComponent(java.awt.Container focusCycleRoot) {
// getDefaultComponent must not return null for Windows to make them focusable.
@@ -68,12 +68,12 @@ public class FocusTraversalPolicy extends java.awt.FocusTraversalPolicy {
}
return null;
}
-
+
/** Returns the first Component in the traversal cycle */
public java.awt.Component getFirstComponent(java.awt.Container focusCycleRoot) {
return null;
}
-
+
/** Returns the Component that should receive the focus when a Window is made visible for the first time */
public java.awt.Component getInitialComponent(java.awt.Window window) {
if (window instanceof NativeFrame) {
@@ -81,7 +81,7 @@ public class FocusTraversalPolicy extends java.awt.FocusTraversalPolicy {
}
return null;
}
-
+
/** Returns the last Component in the traversal cycle */
public java.awt.Component getLastComponent(java.awt.Container focusCycleRoot) {
return null;
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Frame.java b/accessibility/bridge/org/openoffice/java/accessibility/Frame.java
index b7f37b2d6b18..7768afdc8af7 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/Frame.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/Frame.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
@@ -32,22 +32,22 @@ import com.sun.star.accessibility.*;
public class Frame extends java.awt.Frame implements javax.accessibility.Accessible, NativeFrame {
protected XAccessibleComponent unoAccessibleComponent;
-
+
boolean opened = false;
boolean visible = false;
boolean active = false;
-
+
java.awt.EventQueue eventQueue = null;
-
+
protected Frame(XAccessibleComponent xAccessibleComponent) {
initialize(xAccessibleComponent);
}
-
+
protected Frame(String name, XAccessibleComponent xAccessibleComponent) {
super(name);
initialize(xAccessibleComponent);
}
-
+
private void initialize(XAccessibleComponent xAccessibleComponent) {
unoAccessibleComponent = xAccessibleComponent;
eventQueue = java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue();
@@ -58,24 +58,24 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi
broadcaster.addEventListener(new AccessibleFrameListener());
}
}
-
+
java.awt.Component initialComponent = null;
-
+
public java.awt.Component getInitialComponent() {
return initialComponent;
}
-
+
public void setInitialComponent(java.awt.Component c) {
initialComponent = c;
}
-
+
public Integer getHWND() {
return null;
}
-
+
/**
- * Determines whether this <code>Component</code> is showing on screen.
- * This means that the component must be visible, and it must be in a
+ * Determines whether this <code>Component</code> is showing on screen.
+ * This means that the component must be visible, and it must be in a
* <code>container</code> that is visible and showing.
* @see #addNotify
* @see #removeNotify
@@ -88,10 +88,10 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi
}
return false;
}
-
+
/**
* Makes this <code>Component</code> displayable by connecting it to a
- * native screen resource.
+ * native screen resource.
* This method is called internally by the toolkit and should
* not be called directly by programs.
* @see #isDisplayable
@@ -101,10 +101,10 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi
public void addNotify() {
// createHierarchyEvents(0, null, null, 0, false);
}
-
- /**
+
+ /**
* Makes this <code>Component</code> undisplayable by destroying it native
- * screen resource.
+ * screen resource.
* This method is called by the toolkit internally and should
* not be called directly by programs.
* @see #isDisplayable
@@ -113,7 +113,7 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi
*/
public void removeNotify() {
}
-
+
/**
* Determines if the object is visible. Note: this means that the
* object intends to be visible; however, it may not in fact be
@@ -126,7 +126,7 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi
public boolean isVisible(){
return visible;
}
-
+
/**
* Shows or hides this component depending on the value of parameter
* <code>b</code>.
@@ -150,28 +150,28 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi
}
}
}
-
+
public void dispose() {
setVisible(false);
postWindowEvent(java.awt.event.WindowEvent.WINDOW_CLOSED);
}
-
+
protected void postWindowEvent(int i) {
eventQueue.postEvent(new java.awt.event.WindowEvent(this, i));
}
-
+
protected void postComponentEvent(int i) {
eventQueue.postEvent(new java.awt.event.ComponentEvent(this, i));
}
-
+
/**
* Update the proxy objects appropriatly on property change events
*/
protected class AccessibleFrameListener implements XAccessibleEventListener {
-
+
protected AccessibleFrameListener() {
}
-
+
// The only expected state changes are ACTIVE and VISIBLE
protected void setComponentState(short state, boolean enable) {
switch (state) {
@@ -187,8 +187,8 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi
if (Build.DEBUG) {
System.err.println("[frame]" + getTitle() + (enable ? " is now " : " is no longer ") + "iconified");
}
- postWindowEvent(enable ?
- java.awt.event.WindowEvent.WINDOW_ICONIFIED :
+ postWindowEvent(enable ?
+ java.awt.event.WindowEvent.WINDOW_ICONIFIED :
java.awt.event.WindowEvent.WINDOW_DEICONIFIED);
break;
case AccessibleStateType.VISIBLE:
@@ -201,7 +201,7 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi
break;
}
}
-
+
/** Updates the accessible name and fires the appropriate PropertyChangedEvent */
protected void handleNameChangedEvent(Object any) {
try {
@@ -217,7 +217,7 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi
} catch (com.sun.star.lang.IllegalArgumentException e) {
}
}
-
+
/** Updates the accessible description and fires the appropriate PropertyChangedEvent */
protected void handleDescriptionChangedEvent(Object any) {
try {
@@ -231,23 +231,23 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi
} catch (com.sun.star.lang.IllegalArgumentException e) {
}
}
-
+
/** Updates the internal states and fires the appropriate PropertyChangedEvent */
protected void handleStateChangedEvent(Object any1, Object any2) {
try {
if (AnyConverter.isShort(any1)) {
setComponentState(AnyConverter.toShort(any1), false);
}
-
+
if (AnyConverter.isShort(any2)) {
setComponentState(AnyConverter.toShort(any2), true);
}
}
-
+
catch (com.sun.star.lang.IllegalArgumentException e) {
}
}
-
+
/** Fires a visible data property change event */
protected void handleVisibleDataEvent() {
javax.accessibility.AccessibleContext ac = accessibleContext;
@@ -255,7 +255,7 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi
ac.firePropertyChange(javax.accessibility.AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null);
}
}
-
+
/** Called by OpenOffice process to notify property changes */
public void notifyEvent(AccessibleEventObject event) {
switch (event.EventId) {
@@ -291,14 +291,14 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi
}
}
}
-
+
/** Called by OpenOffice process to notify that the UNO component is disposing */
public void disposing(com.sun.star.lang.EventObject eventObject) {
}
}
-
+
protected javax.accessibility.AccessibleContext accessibleContext = null;
-
+
/** Returns the AccessibleContext associated with this object */
public javax.accessibility.AccessibleContext getAccessibleContext() {
if (accessibleContext == null) {
@@ -307,14 +307,14 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi
}
return accessibleContext;
}
-
+
protected class AccessibleFrame extends java.awt.Frame.AccessibleAWTFrame {
protected AccessibleFrame() {
super();
}
-
+
protected java.awt.event.ComponentListener accessibleComponentHandler = null;
-
+
/**
* Fire PropertyChange listener, if one is registered,
* when shown/hidden..
@@ -325,22 +325,22 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi
javax.accessibility.AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
javax.accessibility.AccessibleState.VISIBLE, null);
}
-
+
public void componentShown(java.awt.event.ComponentEvent e) {
AccessibleFrame.this.firePropertyChange(
javax.accessibility.AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
null, javax.accessibility.AccessibleState.VISIBLE);
}
-
+
public void componentMoved(java.awt.event.ComponentEvent e) {
}
-
+
public void componentResized(java.awt.event.ComponentEvent e) {
}
} // inner class AccessibleComponentHandler
-
+
protected java.awt.event.WindowListener accessibleWindowHandler = null;
-
+
/**
* Fire PropertyChange listener, if one is registered,
* when window events happen
@@ -355,21 +355,21 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi
System.err.println("[frame] " + getTitle() + " is now active");
}
}
-
+
/** Invoked when a window has been closed as the result of calling dispose on the window. */
public void windowClosed(java.awt.event.WindowEvent e) {
if (Build.DEBUG) {
System.err.println("[frame] " + getTitle() + " has been closed");
}
}
-
+
/** Invoked when the user attempts to close the window from the window's system menu. */
public void windowClosing(java.awt.event.WindowEvent e) {
if (Build.DEBUG) {
System.err.println("[frame] " + getTitle() + " is closing");
}
}
-
+
/** Invoked when a Window is no longer the active Window. */
public void windowDeactivated(java.awt.event.WindowEvent e) {
AccessibleFrame.this.firePropertyChange(
@@ -379,43 +379,43 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi
System.err.println("[frame] " + getTitle() + " is no longer active");
}
}
-
+
/** Invoked when a window is changed from a minimized to a normal state. */
public void windowDeiconified(java.awt.event.WindowEvent e) {
if (Build.DEBUG) {
System.err.println("[frame] " + getTitle() + " is no longer iconified");
}
}
-
+
/** Invoked when a window is changed from a normal to a minimized state. */
public void windowIconified(java.awt.event.WindowEvent e) {
if (Build.DEBUG) {
System.err.println("[frame] " + getTitle() + " has been iconified");
}
}
-
+
/** Invoked the first time a window is made visible. */
public void windowOpened(java.awt.event.WindowEvent e) {
if (Build.DEBUG) {
System.err.println("[frame] " + getTitle() + " has been opened");
}
}
-
+
} // inner class AccessibleWindowHandler
-
+
protected java.awt.event.ContainerListener accessibleContainerHandler = null;
-
+
/**
* Fire PropertyChange listener, if one is registered,
* when children added/removed.
*/
-
+
protected class AccessibleContainerHandler implements java.awt.event.ContainerListener {
public void componentAdded(java.awt.event.ContainerEvent e) {
java.awt.Component c = e.getChild();
if (c != null && c instanceof javax.accessibility.Accessible) {
AccessibleFrame.this.firePropertyChange(
- javax.accessibility.AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
+ javax.accessibility.AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
null, ((javax.accessibility.Accessible) c).getAccessibleContext());
}
}
@@ -423,14 +423,14 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi
java.awt.Component c = e.getChild();
if (c != null && c instanceof javax.accessibility.Accessible) {
AccessibleFrame.this.firePropertyChange(
- javax.accessibility.AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
- ((javax.accessibility.Accessible) c).getAccessibleContext(), null);
+ javax.accessibility.AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
+ ((javax.accessibility.Accessible) c).getAccessibleContext(), null);
}
}
}
-
+
protected int propertyChangeListenerCount = 0;
-
+
/**
* Add a PropertyChangeListener to the listener list.
*
@@ -440,16 +440,16 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi
if (propertyChangeListenerCount++ == 0) {
accessibleWindowHandler = new AccessibleWindowHandler();
Frame.this.addWindowListener(accessibleWindowHandler);
-
+
accessibleContainerHandler = new AccessibleContainerHandler();
Frame.this.addContainerListener(accessibleContainerHandler);
-
+
accessibleComponentHandler = new AccessibleComponentHandler();
Frame.this.addComponentListener(accessibleComponentHandler);
}
super.addPropertyChangeListener(listener);
}
-
+
/**
* Remove a PropertyChangeListener from the listener list.
* This removes a PropertyChangeListener that was registered
@@ -461,20 +461,20 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi
if (--propertyChangeListenerCount == 0) {
Frame.this.removeComponentListener(accessibleComponentHandler);
accessibleComponentHandler = null;
-
+
Frame.this.removeContainerListener(accessibleContainerHandler);
accessibleContainerHandler = null;
-
+
Frame.this.removeWindowListener(accessibleWindowHandler);
accessibleWindowHandler = null;
}
super.removePropertyChangeListener(listener);
}
-
+
/**
* Get the state set of this object.
*
- * @return an instance of AccessibleState containing the current state
+ * @return an instance of AccessibleState containing the current state
* of the object
* @see AccessibleState
*/
@@ -485,11 +485,11 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi
}
return states;
}
-
+
/*
* AccessibleComponent
*/
-
+
/** Returns the background color of the object */
public java.awt.Color getBackground() {
try {
@@ -498,11 +498,11 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi
return null;
}
}
-
+
public void setBackground(java.awt.Color c) {
// Not supported by UNO accessibility API
}
-
+
/** Returns the foreground color of the object */
public java.awt.Color getForeground() {
try {
@@ -511,118 +511,118 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi
return null;
}
}
-
+
public void setForeground(java.awt.Color c) {
// Not supported by UNO accessibility API
}
-
+
public java.awt.Cursor getCursor() {
// Not supported by UNO accessibility API
return null;
}
-
+
public void setCursor(java.awt.Cursor cursor) {
// Not supported by UNO accessibility API
}
-
+
public java.awt.Font getFont() {
// FIXME
return null;
}
-
+
public void setFont(java.awt.Font f) {
// Not supported by UNO accessibility API
}
-
+
public java.awt.FontMetrics getFontMetrics(java.awt.Font f) {
// FIXME
return null;
}
-
+
public boolean isEnabled() {
return Frame.this.isEnabled();
}
-
+
public void setEnabled(boolean b) {
// Not supported by UNO accessibility API
}
-
+
public boolean isVisible() {
return Frame.this.isVisible();
}
-
+
public void setVisible(boolean b) {
// Not supported by UNO accessibility API
}
-
+
public boolean isShowing() {
return Frame.this.isShowing();
}
-
+
public boolean contains(java.awt.Point p) {
try {
- return unoAccessibleComponent.containsPoint(new com.sun.star.awt.Point(p.x, p.y));
+ return unoAccessibleComponent.containsPoint(new com.sun.star.awt.Point(p.x, p.y));
} catch (com.sun.star.uno.RuntimeException e) {
return false;
}
}
-
+
/** Returns the location of the object on the screen. */
public java.awt.Point getLocationOnScreen() {
try {
- com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocationOnScreen();
+ com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocationOnScreen();
return new java.awt.Point(unoPoint.X, unoPoint.Y);
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Gets the location of this component in the form of a point specifying the component's top-left corner */
public java.awt.Point getLocation() {
try {
- com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocation();
+ com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocation();
return new java.awt.Point( unoPoint.X, unoPoint.Y );
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Moves this component to a new location */
public void setLocation(java.awt.Point p) {
// Not supported by UNO accessibility API
}
-
+
/** Gets the bounds of this component in the form of a Rectangle object */
public java.awt.Rectangle getBounds() {
try {
- com.sun.star.awt.Rectangle unoRect = unoAccessibleComponent.getBounds();
+ com.sun.star.awt.Rectangle unoRect = unoAccessibleComponent.getBounds();
return new java.awt.Rectangle(unoRect.X, unoRect.Y, unoRect.Width, unoRect.Height);
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Moves and resizes this component to conform to the new bounding rectangle r */
public void setBounds(java.awt.Rectangle r) {
// Not supported by UNO accessibility API
}
-
+
/** Returns the size of this component in the form of a Dimension object */
public java.awt.Dimension getSize() {
try {
- com.sun.star.awt.Size unoSize = unoAccessibleComponent.getSize();
+ com.sun.star.awt.Size unoSize = unoAccessibleComponent.getSize();
return new java.awt.Dimension(unoSize.Width, unoSize.Height);
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Resizes this component so that it has width d.width and height d.height */
public void setSize(java.awt.Dimension d) {
// Not supported by UNO accessibility API
}
-
- /** Returns the Accessible child, if one exists, contained at the local coordinate Point */
+
+ /** Returns the Accessible child, if one exists, contained at the local coordinate Point */
public javax.accessibility.Accessible getAccessibleAt(java.awt.Point p) {
try {
java.awt.Component c = AccessibleObjectFactory.getAccessibleComponent(
@@ -633,11 +633,11 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi
return null;
}
}
-
+
public boolean isFocusTraversable() {
return Frame.this.isFocusable();
}
-
+
public void requestFocus() {
unoAccessibleComponent.grabFocus();
}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Icon.java b/accessibility/bridge/org/openoffice/java/accessibility/Icon.java
index 8ccc97def4d8..1dd151eaf074 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/Icon.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/Icon.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/bridge/org/openoffice/java/accessibility/Label.java b/accessibility/bridge/org/openoffice/java/accessibility/Label.java
index 9afaa0a1ae37..62c2155c71f9 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/Label.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/Label.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
@@ -64,10 +64,10 @@ public class Label extends Component implements javax.accessibility.Accessible {
/** Gets the AccessibleText associated with this object presenting text on the display */
public javax.accessibility.AccessibleText getAccessibleText() {
-
+
if (disposed)
return null;
-
+
try {
XAccessibleText unoAccessibleText = (XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class,
unoAccessibleContext);
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/List.java b/accessibility/bridge/org/openoffice/java/accessibility/List.java
index c0583bf9b692..7a0a86d166d2 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/List.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/List.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,18 +35,18 @@ import com.sun.star.uno.UnoRuntime;
import com.sun.star.accessibility.*;
public class List extends DescendantManager implements javax.accessibility.Accessible {
-
+
protected List(XAccessible xAccessible, XAccessibleContext xAccessibleContext) {
super(xAccessible, xAccessibleContext);
}
-
+
protected void setActiveDescendant(javax.accessibility.Accessible descendant) {
javax.accessibility.Accessible oldAD = activeDescendant;
activeDescendant = descendant;
firePropertyChange(AccessibleContext.ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY,
oldAD, descendant);
}
-
+
protected void setActiveDescendant(Object any) {
javax.accessibility.Accessible descendant = null;
try {
@@ -59,11 +59,11 @@ public class List extends DescendantManager implements javax.accessibility.Acces
if (Build.DEBUG) {
try {
if (Build.DEBUG) {
- System.err.println("[List] retrieved active descendant event: new descendant is " +
+ System.err.println("[List] retrieved active descendant event: new descendant is " +
unoAccessible.getAccessibleContext().getAccessibleName());
}
} catch (java.lang.NullPointerException e) {
- System.err.println("*** ERROR *** new active descendant not accessible");
+ System.err.println("*** ERROR *** new active descendant not accessible");
}
}
}
@@ -72,50 +72,50 @@ public class List extends DescendantManager implements javax.accessibility.Acces
} catch (com.sun.star.lang.IllegalArgumentException e) {
}
}
-
+
protected void add(XAccessible unoAccessible) {
if (unoAccessible != null) {
ListItem item = new ListItem(unoAccessible);
- // The AccessBridge for Windows expects an instance of AccessibleContext
+ // The AccessBridge for Windows expects an instance of AccessibleContext
// as parameters
firePropertyChange(AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
null, item.getAccessibleContext());
}
}
-
+
protected void remove(XAccessible unoAccessible) {
if (unoAccessible != null) {
ListItem item = new ListItem(unoAccessible);
- // The AccessBridge for Windows expects an instance of AccessibleContext
+ // The AccessBridge for Windows expects an instance of AccessibleContext
// as parameters
firePropertyChange(AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
item.getAccessibleContext(), null);
}
}
-
+
protected void add(Object any) {
try {
add((XAccessible) AnyConverter.toObject(AccessibleObjectFactory.XAccessibleType, any));
} catch (com.sun.star.lang.IllegalArgumentException e) {
}
}
-
+
protected void remove(Object any) {
try {
remove((XAccessible) AnyConverter.toObject(AccessibleObjectFactory.XAccessibleType, any));
} catch (com.sun.star.lang.IllegalArgumentException e) {
}
}
-
+
/**
* Update the proxy objects appropriatly on property change events
*/
protected class AccessibleListListener extends AccessibleDescendantManagerListener {
-
+
protected AccessibleListListener() {
super();
}
-
+
/** Called by OpenOffice process to notify property changes */
public void notifyEvent(AccessibleEventObject event) {
switch (event.EventId) {
@@ -139,23 +139,23 @@ public class List extends DescendantManager implements javax.accessibility.Acces
}
}
}
-
+
protected XAccessibleEventListener createEventListener() {
return new AccessibleListListener();
}
-
+
/** Creates the AccessibleContext associated with this object */
public javax.accessibility.AccessibleContext createAccessibleContext() {
return new AccessibleList();
}
-
+
protected class AccessibleList extends AccessibleDescendantManager {
-
+
/** Gets the role of this object */
public javax.accessibility.AccessibleRole getAccessibleRole() {
return javax.accessibility.AccessibleRole.LIST;
}
-
+
/** Returns the specified Accessible child of the object */
public javax.accessibility.Accessible getAccessibleChild(int i) {
javax.accessibility.Accessible child = null;
@@ -175,12 +175,12 @@ public class List extends DescendantManager implements javax.accessibility.Acces
}
return child;
}
-
+
/*
* AccessibleComponent
*/
-
- /** Returns the Accessible child, if one exists, contained at the local coordinate Point */
+
+ /** Returns the Accessible child, if one exists, contained at the local coordinate Point */
public javax.accessibility.Accessible getAccessibleAt(java.awt.Point p) {
javax.accessibility.Accessible child = null;
try {
@@ -199,11 +199,11 @@ public class List extends DescendantManager implements javax.accessibility.Acces
return null;
}
}
-
+
/*
* AccessibleSelection
*/
-
+
/** Returns an Accessible representing the specified selected child of the object */
public javax.accessibility.Accessible getAccessibleSelection(int i) {
javax.accessibility.Accessible child = null;
@@ -229,15 +229,15 @@ public class List extends DescendantManager implements javax.accessibility.Acces
return child;
}
}
-
+
class ListItem extends java.awt.Component implements javax.accessibility.Accessible {
-
+
protected XAccessible unoAccessible;
-
+
public ListItem(XAccessible xAccessible) {
unoAccessible = xAccessible;
}
-
+
public Object[] create(Object[] targetSet) {
try {
java.util.ArrayList list = new java.util.ArrayList(targetSet.length);
@@ -254,9 +254,9 @@ public class List extends DescendantManager implements javax.accessibility.Acces
return null;
}
}
-
+
javax.accessibility.AccessibleContext accessibleContext = null;
-
+
/** Returns the AccessibleContext associated with this object */
public javax.accessibility.AccessibleContext getAccessibleContext() {
if (accessibleContext == null) {
@@ -275,15 +275,15 @@ public class List extends DescendantManager implements javax.accessibility.Acces
}
return accessibleContext;
}
-
+
protected class AccessibleListItem extends javax.accessibility.AccessibleContext {
-
+
XAccessibleContext unoAccessibleContext;
-
+
public AccessibleListItem(XAccessibleContext xAccessibleContext) {
unoAccessibleContext = xAccessibleContext;
}
-
+
/** Returns the accessible name of this object */
public String getAccessibleName() {
try {
@@ -292,12 +292,12 @@ public class List extends DescendantManager implements javax.accessibility.Acces
return null;
}
}
-
+
/** Sets the accessible name of this object */
public void setAccessibleName(String name) {
// Not supported
}
-
+
/** Returns the accessible name of this object */
public String getAccessibleDescription() {
try {
@@ -306,12 +306,12 @@ public class List extends DescendantManager implements javax.accessibility.Acces
return null;
}
}
-
+
/** Sets the accessible name of this object */
public void setAccessibleDescription(String name) {
// Not supported
}
-
+
/** Returns the accessible role of this object */
public javax.accessibility.AccessibleRole getAccessibleRole() {
try {
@@ -322,7 +322,7 @@ public class List extends DescendantManager implements javax.accessibility.Acces
return null;
}
}
-
+
/** Gets the locale of the component */
public java.util.Locale getLocale() throws java.awt.IllegalComponentStateException {
try {
@@ -334,16 +334,16 @@ public class List extends DescendantManager implements javax.accessibility.Acces
return List.this.getLocale();
}
}
-
+
/** Gets the 0-based index of this object in its accessible parent */
public int getAccessibleIndexInParent() {
try {
return unoAccessibleContext.getAccessibleIndexInParent();
} catch (com.sun.star.uno.RuntimeException e) {
return -1;
- }
+ }
}
-
+
/** Returns the number of accessible children of the object. */
public int getAccessibleChildrenCount() {
try {
@@ -352,7 +352,7 @@ public class List extends DescendantManager implements javax.accessibility.Acces
return 0;
}
}
-
+
/** Returns the specified Accessible child of the object. */
public javax.accessibility.Accessible getAccessibleChild(int i) {
javax.accessibility.Accessible child = null;
@@ -370,7 +370,7 @@ public class List extends DescendantManager implements javax.accessibility.Acces
}
return child;
}
-
+
/** Returns the state set of this object */
public javax.accessibility.AccessibleStateSet getAccessibleStateSet() {
try {
@@ -380,68 +380,68 @@ public class List extends DescendantManager implements javax.accessibility.Acces
return AccessibleStateAdapter.getDefunctStateSet();
}
}
-
+
/** Gets the AccessibleComponent associated with this object that has a graphical representation */
public javax.accessibility.AccessibleComponent getAccessibleComponent() {
try {
XAccessibleComponent unoAccessibleComponent = (XAccessibleComponent)
UnoRuntime.queryInterface(XAccessibleComponent.class, unoAccessibleContext);
- return (unoAccessibleComponent != null) ?
+ return (unoAccessibleComponent != null) ?
new AccessibleComponentImpl(unoAccessibleComponent) : null;
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Gets the AccessibleAction associated with this object that has a graphical representation */
public javax.accessibility.AccessibleAction getAccessibleAction() {
try {
XAccessibleAction unoAccessibleAction = (XAccessibleAction)
UnoRuntime.queryInterface(XAccessibleAction.class, unoAccessibleContext);
- return (unoAccessibleAction != null) ?
+ return (unoAccessibleAction != null) ?
new AccessibleActionImpl(unoAccessibleAction) : null;
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Gets the AccessibleText associated with this object that has a graphical representation */
public javax.accessibility.AccessibleText getAccessibleText() {
-
+
if (disposed)
return null;
-
+
try {
XAccessibleText unoAccessibleText = (XAccessibleText)
UnoRuntime.queryInterface(XAccessibleText.class, unoAccessibleContext);
- return (unoAccessibleText != null) ?
+ return (unoAccessibleText != null) ?
new AccessibleTextImpl(unoAccessibleText) : null;
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Gets the AccessibleValue associated with this object that has a graphical representation */
public javax.accessibility.AccessibleValue getAccessibleValue() {
try {
XAccessibleValue unoAccessibleValue = (XAccessibleValue)
UnoRuntime.queryInterface(XAccessibleValue.class, unoAccessibleContext);
- return (unoAccessibleValue != null) ?
+ return (unoAccessibleValue != null) ?
new AccessibleValueImpl(unoAccessibleValue) : null;
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Gets the AccessibleText associated with this object presenting text on the display */
public javax.accessibility.AccessibleIcon[] getAccessibleIcon() {
try {
- XAccessibleImage unoAccessibleImage = (XAccessibleImage)
+ XAccessibleImage unoAccessibleImage = (XAccessibleImage)
UnoRuntime.queryInterface(XAccessibleImage.class, unoAccessibleContext);
if (unoAccessibleImage != null) {
javax.accessibility.AccessibleIcon[] icons = { new AccessibleIconImpl(unoAccessibleImage) };
return icons;
- }
+ }
} catch (com.sun.star.uno.RuntimeException e) {
}
return null;
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Menu.java b/accessibility/bridge/org/openoffice/java/accessibility/Menu.java
index 346baca749b3..7ece90dcc360 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/Menu.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/Menu.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
@@ -68,7 +68,7 @@ public class Menu extends AbstractButton
}
protected synchronized void add(XAccessible unoAccessible) {
- // The AccessBridge for Windows expects an instance of AccessibleContext
+ // The AccessBridge for Windows expects an instance of AccessibleContext
// as parameters
java.awt.Component c = getComponent(unoAccessible);
@@ -85,7 +85,7 @@ public class Menu extends AbstractButton
}
protected synchronized void remove(XAccessible unoAccessible) {
- // The AccessBridge for Windows expects an instance of AccessibleContext
+ // The AccessBridge for Windows expects an instance of AccessibleContext
// as parameters
java.awt.Component c = getComponent(unoAccessible);
@@ -265,7 +265,7 @@ public class Menu extends AbstractButton
public void addAccessibleSelection(int i) {
try {
javax.accessibility.Accessible a = getAccessibleChild(i);
-
+
// selecting menu items invokes the click action in Java 1.5
if( a instanceof MenuItem )
a.getAccessibleContext().getAccessibleAction().doAccessibleAction(0);
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/MenuContainer.java b/accessibility/bridge/org/openoffice/java/accessibility/MenuContainer.java
index ccae0ccadd04..090c122f3e9e 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/MenuContainer.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/MenuContainer.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
@@ -32,20 +32,20 @@ import javax.accessibility.AccessibleContext;
import com.sun.star.uno.*;
import com.sun.star.accessibility.*;
-/**
+/**
* Specialized container for MenuBar and Popup-Menu(s)
* FIXME: join with Menu ?
*/
public class MenuContainer extends Container implements javax.accessibility.Accessible {
protected XAccessibleSelection unoAccessibleSelection = null;
-
+
protected MenuContainer(javax.accessibility.AccessibleRole role, XAccessible xAccessible, XAccessibleContext xAccessibleContext) {
super(role, xAccessible, xAccessibleContext);
}
-
+
protected class AccessibleMenuContainerListener extends AccessibleContainerListener {
-
+
protected AccessibleMenuContainerListener() {
super();
}
@@ -63,18 +63,18 @@ public class MenuContainer extends Container implements javax.accessibility.Acce
}
}
}
-
+
protected XAccessibleEventListener createEventListener() {
return new AccessibleMenuContainerListener();
}
-
+
/** Creates the AccessibleContext associated with this object */
public javax.accessibility.AccessibleContext createAccessibleContext() {
return new AccessibleMenuContainer();
}
protected class AccessibleMenuContainer extends AccessibleContainer implements javax.accessibility.AccessibleSelection {
-
+
protected AccessibleMenuContainer() {
unoAccessibleSelection = (XAccessibleSelection) UnoRuntime.queryInterface(XAccessibleSelection.class,
unoAccessibleContext);
@@ -103,7 +103,7 @@ public class MenuContainer extends Container implements javax.accessibility.Acce
public void addAccessibleSelection(int i) {
try {
javax.accessibility.Accessible a = getAccessibleChild(i);
-
+
// selecting menu items invokes the click action in Java 1.5
if( a instanceof MenuItem )
a.getAccessibleContext().getAccessibleAction().doAccessibleAction(0);
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/MenuItem.java b/accessibility/bridge/org/openoffice/java/accessibility/MenuItem.java
index 39aa1b73ce30..56886bcb78a2 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/MenuItem.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/MenuItem.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
@@ -37,24 +37,24 @@ class MenuItem extends ToggleButton {
}
protected class AccessibleMenuItemListener extends AccessibleUNOComponentListener {
-
+
protected AccessibleMenuItemListener() {
}
-
+
protected void setComponentState(short state, boolean enable) {
-
+
// #i56538# menu items in Java 1.5 are ARMED, not SELECTED
if( state == com.sun.star.accessibility.AccessibleStateType.SELECTED )
fireStatePropertyChange(javax.accessibility.AccessibleState.ARMED, enable);
else
super.setComponentState(state, enable);
- }
+ }
};
protected XAccessibleEventListener createEventListener() {
return new AccessibleMenuItemListener();
}
-
+
/** Creates the AccessibleContext associated with this object */
public javax.accessibility.AccessibleContext createAccessibleContext() {
return new AccessibleMenuItem();
@@ -74,7 +74,7 @@ class MenuItem extends ToggleButton {
return super.getAccessibleIndexInParent();
}
}
-
+
/**
* Gets the current state set of this object.
*
@@ -84,16 +84,16 @@ class MenuItem extends ToggleButton {
*/
public javax.accessibility.AccessibleStateSet getAccessibleStateSet() {
javax.accessibility.AccessibleStateSet stateSet = super.getAccessibleStateSet();
-
+
// #i56538# menu items in Java do not have SELECTABLE ..
stateSet.remove(javax.accessibility.AccessibleState.SELECTABLE);
-
+
// .. and also ARMED insted of SELECTED
if( stateSet.remove(javax.accessibility.AccessibleState.SELECTED) )
stateSet.add(javax.accessibility.AccessibleState.ARMED);
-
+
return stateSet;
}
-
+
}
}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/NativeFrame.java b/accessibility/bridge/org/openoffice/java/accessibility/NativeFrame.java
index bcc4c0dddebc..d11bf4a440e9 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/NativeFrame.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/NativeFrame.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/bridge/org/openoffice/java/accessibility/Paragraph.java b/accessibility/bridge/org/openoffice/java/accessibility/Paragraph.java
index 6088bf48eabe..62d5441e9eaf 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/Paragraph.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/Paragraph.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
@@ -33,16 +33,16 @@ import javax.accessibility.AccessibleText;
import com.sun.star.uno.*;
import com.sun.star.accessibility.*;
-/**
+/**
*/
public class Paragraph extends Container implements javax.accessibility.Accessible {
-
+
protected Paragraph(XAccessible xAccessible, XAccessibleContext xAccessibleContext) {
super(javax.accessibility.AccessibleRole.TEXT, xAccessible, xAccessibleContext);
}
-
+
protected class AccessibleParagraphListener extends AccessibleContainerListener {
-
+
protected AccessibleParagraphListener() {
super();
}
@@ -62,7 +62,7 @@ public class Paragraph extends Container implements javax.accessibility.Accessib
break;
}
}
-
+
protected void handleVisibleDataChanged() {
if (Paragraph.this.isFocusOwner()) {
@@ -79,13 +79,13 @@ public class Paragraph extends Container implements javax.accessibility.Accessib
}
}
}
-
+
/** Called by OpenOffice process to notify property changes */
public void notifyEvent(AccessibleEventObject event) {
switch (event.EventId) {
case AccessibleEventId.CARET_CHANGED:
firePropertyChange(accessibleContext.ACCESSIBLE_CARET_PROPERTY,
- Component.toNumber(event.OldValue),
+ Component.toNumber(event.OldValue),
Component.toNumber(event.NewValue));
break;
case AccessibleEventId.VISIBLE_DATA_CHANGED:
@@ -99,28 +99,28 @@ public class Paragraph extends Container implements javax.accessibility.Accessib
}
}
}
-
+
protected XAccessibleEventListener createEventListener() {
return new AccessibleParagraphListener();
}
-
+
/** Creates the AccessibleContext associated with this object */
public javax.accessibility.AccessibleContext createAccessibleContext() {
return new AccessibleParagraph();
}
protected class AccessibleParagraph extends AccessibleContainer {
-
+
protected AccessibleParagraph() {
// Don't do the queryInterface on XAccessibleText already ..
super(false);
- /* Since getAccessibleText() is heavily used by the java access
+ /* Since getAccessibleText() is heavily used by the java access
* bridge for gnome and the gnome at-tools, we do a query interface
* here and remember the result.
*/
accessibleText = AccessibleHypertextImpl.get(unoAccessibleContext);
}
-
+
/*
* AccessibleContext
*/
@@ -132,12 +132,12 @@ public class Paragraph extends Container implements javax.accessibility.Accessib
/** Gets the AccessibleEditableText associated with this object presenting text on the display */
public javax.accessibility.AccessibleEditableText getAccessibleEditableText() {
-
+
if (disposed)
return null;
-
+
try {
- XAccessibleEditableText unoAccessibleText = (XAccessibleEditableText)
+ XAccessibleEditableText unoAccessibleText = (XAccessibleEditableText)
UnoRuntime.queryInterface(XAccessibleEditableText.class,
unoAccessibleComponent);
if (unoAccessibleText != null) {
@@ -149,28 +149,28 @@ public class Paragraph extends Container implements javax.accessibility.Accessib
return null;
}
}
-
+
/** Gets the AccessibleAction associated with this object that has a graphical representation */
public javax.accessibility.AccessibleAction getAccessibleAction() {
try {
XAccessibleAction unoAccessibleAction = (XAccessibleAction)
UnoRuntime.queryInterface(XAccessibleAction.class, unoAccessibleComponent);
- return (unoAccessibleAction != null) ?
+ return (unoAccessibleAction != null) ?
new AccessibleActionImpl(unoAccessibleAction) : null;
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Returns the relation set of this object */
public javax.accessibility.AccessibleRelationSet getAccessibleRelationSet() {
try {
- XAccessibleRelationSet unoAccessibleRelationSet =
+ XAccessibleRelationSet unoAccessibleRelationSet =
unoAccessible.getAccessibleContext().getAccessibleRelationSet();
if (unoAccessibleRelationSet == null) {
return super.getAccessibleRelationSet();
}
-
+
javax.accessibility.AccessibleRelationSet relationSet = new javax.accessibility.AccessibleRelationSet();
int count = unoAccessibleRelationSet.getRelationCount();
for (int i = 0; i < count; i++) {
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/RadioButton.java b/accessibility/bridge/org/openoffice/java/accessibility/RadioButton.java
index 3daeee6cd8de..53f4bc1285fb 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/RadioButton.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/RadioButton.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/bridge/org/openoffice/java/accessibility/ScrollBar.java b/accessibility/bridge/org/openoffice/java/accessibility/ScrollBar.java
index 83b17d698201..68e0a7ab0ff6 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/ScrollBar.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/ScrollBar.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
@@ -34,25 +34,25 @@ import javax.swing.SwingConstants;
import com.sun.star.uno.*;
import com.sun.star.accessibility.*;
-/**
+/**
*/
public class ScrollBar extends Component implements SwingConstants, javax.accessibility.Accessible {
-
+
public ScrollBar(XAccessible xAccessible, XAccessibleContext xAccessibleContext) {
super(xAccessible, xAccessibleContext);
}
-
+
/** Creates the AccessibleContext associated with this object */
public javax.accessibility.AccessibleContext createAccessibleContext() {
return new AccessibleScrollBar();
}
-
- protected class AccessibleScrollBar extends AccessibleUNOComponent implements
- javax.accessibility.AccessibleAction {
-
+
+ protected class AccessibleScrollBar extends AccessibleUNOComponent implements
+ javax.accessibility.AccessibleAction {
+
protected XAccessibleAction unoAccessibleAction;
protected int actionCount = 0;
-
+
/**
* Though the class is abstract, this should be called by all sub-classes
*/
@@ -64,37 +64,37 @@ public class ScrollBar extends Component implements SwingConstants, javax.access
actionCount = unoAccessibleAction.getAccessibleActionCount();
}
}
-
+
/*
* AccessibleContext
*/
-
+
/** Gets the role of this object */
public javax.accessibility.AccessibleRole getAccessibleRole() {
return javax.accessibility.AccessibleRole.SCROLL_BAR;
}
-
+
/** Gets the AccessibleValue associated with this object that has a graphical representation */
public javax.accessibility.AccessibleValue getAccessibleValue() {
try {
XAccessibleValue unoAccessibleValue = (XAccessibleValue)
UnoRuntime.queryInterface(XAccessibleValue.class, unoAccessibleContext);
- return (unoAccessibleValue != null) ?
+ return (unoAccessibleValue != null) ?
new AccessibleValueImpl(unoAccessibleValue) : null;
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Gets the AccessibleAction associated with this object that supports one or more actions */
public javax.accessibility.AccessibleAction getAccessibleAction() {
return this;
}
-
+
/*
* AccessibleAction
*/
-
+
/** Performs the specified Action on the object */
public boolean doAccessibleAction(int param) {
if (param < actionCount) {
@@ -105,7 +105,7 @@ public class ScrollBar extends Component implements SwingConstants, javax.access
}
return false;
}
-
+
/** Returns a description of the specified action of the object */
public java.lang.String getAccessibleActionDescription(int param) {
if(param < actionCount) {
@@ -116,7 +116,7 @@ public class ScrollBar extends Component implements SwingConstants, javax.access
}
return null;
}
-
+
/** Returns the number of accessible actions available in this object */
public int getAccessibleActionCount() {
return actionCount;
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Separator.java b/accessibility/bridge/org/openoffice/java/accessibility/Separator.java
index 892768e07cbb..54ddcf0b0313 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/Separator.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/Separator.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/bridge/org/openoffice/java/accessibility/Table.java b/accessibility/bridge/org/openoffice/java/accessibility/Table.java
index 24ea912d4217..d304cb7cd662 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/Table.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/Table.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
@@ -34,18 +34,18 @@ import com.sun.star.uno.UnoRuntime;
import com.sun.star.accessibility.*;
public class Table extends DescendantManager implements javax.accessibility.Accessible {
-
+
protected Table(XAccessible xAccessible, XAccessibleContext xAccessibleContext, boolean multiselectable) {
super(xAccessible, xAccessibleContext, multiselectable);
}
-
+
protected void setActiveDescendant(javax.accessibility.Accessible descendant) {
javax.accessibility.Accessible oldAD = activeDescendant;
activeDescendant = descendant;
firePropertyChange(javax.accessibility.AccessibleContext.ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY,
oldAD, descendant);
}
-
+
protected void setActiveDescendant(Object any) {
javax.accessibility.Accessible descendant = null;
try {
@@ -61,50 +61,50 @@ public class Table extends DescendantManager implements javax.accessibility.Acce
} catch (com.sun.star.lang.IllegalArgumentException e) {
}
}
-
+
protected void add(XAccessible unoAccessible) {
if (unoAccessible != null) {
TableCell cell = new TableCell(unoAccessible);
- // The AccessBridge for Windows expects an instance of AccessibleContext
+ // The AccessBridge for Windows expects an instance of AccessibleContext
// as parameters
firePropertyChange(javax.accessibility.AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
null, cell.getAccessibleContext());
}
}
-
+
protected void remove(XAccessible unoAccessible) {
if (unoAccessible != null) {
TableCell cell = new TableCell(unoAccessible);
- // The AccessBridge for Windows expects an instance of AccessibleContext
+ // The AccessBridge for Windows expects an instance of AccessibleContext
// as parameters
firePropertyChange(javax.accessibility.AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
cell.getAccessibleContext(), null);
}
}
-
+
protected void add(Object any) {
try {
add((XAccessible) AnyConverter.toObject(AccessibleObjectFactory.XAccessibleType, any));
} catch (com.sun.star.lang.IllegalArgumentException e) {
}
}
-
+
protected void remove(Object any) {
try {
remove((XAccessible) AnyConverter.toObject(AccessibleObjectFactory.XAccessibleType, any));
} catch (com.sun.star.lang.IllegalArgumentException e) {
}
}
-
+
/**
* Update the proxy objects appropriatly on property change events
*/
protected class AccessibleTableListener extends AccessibleDescendantManagerListener {
-
+
protected AccessibleTableListener() {
super();
}
-
+
/** Called by OpenOffice process to notify property changes */
public void notifyEvent(AccessibleEventObject event) {
switch (event.EventId) {
@@ -124,24 +124,24 @@ public class Table extends DescendantManager implements javax.accessibility.Acce
}
}
}
-
+
protected XAccessibleEventListener createEventListener() {
return new AccessibleTableListener();
}
-
+
/** Creates the AccessibleContext associated with this object */
public javax.accessibility.AccessibleContext createAccessibleContext() {
return new AccessibleTable();
}
-
+
protected class AccessibleTable extends AccessibleDescendantManager implements javax.accessibility.AccessibleExtendedTable {
-
+
protected XAccessibleTable unoAccessibleTable;
-
+
public AccessibleTable() {
unoAccessibleTable = (XAccessibleTable) UnoRuntime.queryInterface(XAccessibleTable.class, unoAccessibleContext);
}
-
+
/** Gets the role of this object */
public javax.accessibility.AccessibleRole getAccessibleRole() {
return javax.accessibility.AccessibleRole.TABLE;
@@ -151,7 +151,7 @@ public class Table extends DescendantManager implements javax.accessibility.Acce
public javax.accessibility.AccessibleTable getAccessibleTable() {
return this;
}
-
+
/** Returns the specified Accessible child of the object */
public javax.accessibility.Accessible getAccessibleChild(int i) {
javax.accessibility.Accessible child = null;
@@ -171,12 +171,12 @@ public class Table extends DescendantManager implements javax.accessibility.Acce
}
return child;
}
-
+
/*
* AccessibleComponent
*/
- /** Returns the Accessible child, if one exists, contained at the local coordinate Point */
+ /** Returns the Accessible child, if one exists, contained at the local coordinate Point */
public javax.accessibility.Accessible getAccessibleAt(java.awt.Point p) {
javax.accessibility.Accessible child = null;
try {
@@ -195,11 +195,11 @@ public class Table extends DescendantManager implements javax.accessibility.Acce
}
return child;
}
-
+
/*
* AccessibleSelection
*/
-
+
/** Returns an Accessible representing the specified selected child of the object */
public javax.accessibility.Accessible getAccessibleSelection(int i) {
javax.accessibility.Accessible child = null;
@@ -219,11 +219,11 @@ public class Table extends DescendantManager implements javax.accessibility.Acce
}
return child;
}
-
+
/*
* AccessibleTable
*/
-
+
/** Returns the Accessible at a specified row and column in the table. */
public javax.accessibility.Accessible getAccessibleAt(int r, int c) {
javax.accessibility.Accessible child = null;
@@ -242,7 +242,7 @@ public class Table extends DescendantManager implements javax.accessibility.Acce
} catch (com.sun.star.uno.RuntimeException e) {
}
return child;
- }
+ }
/** Returns the caption for the table. */
public javax.accessibility.Accessible getAccessibleCaption() {
@@ -271,7 +271,7 @@ public class Table extends DescendantManager implements javax.accessibility.Acce
}
}
- /**
+ /**
* Returns the number of columns occupied by the Accessible
* at a specified row and column in the table.
*/
@@ -313,7 +313,7 @@ public class Table extends DescendantManager implements javax.accessibility.Acce
}
/**
- * Returns the number of rows occupied by the Accessible
+ * Returns the number of rows occupied by the Accessible
* at a specified row and column in the table.
*/
public int getAccessibleRowExtentAt(int r, int c) {
@@ -378,9 +378,9 @@ public class Table extends DescendantManager implements javax.accessibility.Acce
}
}
- /**
- * Returns a boolean value indicating whether the accessible
- * at a specified row and column is selected.
+ /**
+ * Returns a boolean value indicating whether the accessible
+ * at a specified row and column is selected.
*/
public boolean isAccessibleSelected(int r, int c) {
try {
@@ -453,17 +453,17 @@ public class Table extends DescendantManager implements javax.accessibility.Acce
} catch (com.sun.star.uno.RuntimeException e) {
return -1;
}
- }
+ }
}
-
+
class TableCell extends java.awt.Component implements javax.accessibility.Accessible {
-
+
protected XAccessible unoAccessible;
-
+
public TableCell(XAccessible xAccessible) {
unoAccessible = xAccessible;
}
-
+
public Object[] create(Object[] targetSet) {
try {
java.util.ArrayList list = new java.util.ArrayList(targetSet.length);
@@ -480,9 +480,9 @@ public class Table extends DescendantManager implements javax.accessibility.Acce
return null;
}
}
-
+
javax.accessibility.AccessibleContext accessibleContext = null;
-
+
/** Returns the AccessibleContext associated with this object */
public javax.accessibility.AccessibleContext getAccessibleContext() {
if (accessibleContext == null) {
@@ -500,15 +500,15 @@ public class Table extends DescendantManager implements javax.accessibility.Acce
}
return accessibleContext;
}
-
+
protected class AccessibleTableCell extends javax.accessibility.AccessibleContext {
-
+
XAccessibleContext unoAccessibleContext;
-
+
public AccessibleTableCell(XAccessibleContext xAccessibleContext) {
unoAccessibleContext = xAccessibleContext;
}
-
+
/** Returns the accessible name of this object */
public String getAccessibleName() {
try {
@@ -517,12 +517,12 @@ public class Table extends DescendantManager implements javax.accessibility.Acce
return null;
}
}
-
+
/** Sets the accessible name of this object */
public void setAccessibleName(String name) {
// Not supported
}
-
+
/** Returns the accessible name of this object */
public String getAccessibleDescription() {
try {
@@ -531,12 +531,12 @@ public class Table extends DescendantManager implements javax.accessibility.Acce
return null;
}
}
-
+
/** Sets the accessible name of this object */
public void setAccessibleDescription(String name) {
// Not supported
}
-
+
/** Returns the accessible role of this object */
public javax.accessibility.AccessibleRole getAccessibleRole() {
try {
@@ -547,7 +547,7 @@ public class Table extends DescendantManager implements javax.accessibility.Acce
return null;
}
}
-
+
/** Gets the locale of the component */
public java.util.Locale getLocale() throws java.awt.IllegalComponentStateException {
try {
@@ -559,16 +559,16 @@ public class Table extends DescendantManager implements javax.accessibility.Acce
return Table.this.getLocale();
}
}
-
+
/** Gets the 0-based index of this object in its accessible parent */
public int getAccessibleIndexInParent() {
try {
return unoAccessibleContext.getAccessibleIndexInParent();
} catch (com.sun.star.uno.RuntimeException e) {
return -1;
- }
+ }
}
-
+
/** Returns the number of accessible children of the object. */
public int getAccessibleChildrenCount() {
try {
@@ -577,7 +577,7 @@ public class Table extends DescendantManager implements javax.accessibility.Acce
return 0;
}
}
-
+
/** Returns the specified Accessible child of the object. */
public javax.accessibility.Accessible getAccessibleChild(int i) {
javax.accessibility.Accessible child = null;
@@ -595,7 +595,7 @@ public class Table extends DescendantManager implements javax.accessibility.Acce
}
return child;
}
-
+
/** Returns the state set of this object */
public javax.accessibility.AccessibleStateSet getAccessibleStateSet() {
try {
@@ -605,7 +605,7 @@ public class Table extends DescendantManager implements javax.accessibility.Acce
return AccessibleStateAdapter.getDefunctStateSet();
}
}
-
+
/** Returns the relation set of this object */
public javax.accessibility.AccessibleRelationSet getAccessibleRelationSet() {
try {
@@ -613,7 +613,7 @@ public class Table extends DescendantManager implements javax.accessibility.Acce
if (unoAccessibleRelationSet == null) {
return null;
}
-
+
javax.accessibility.AccessibleRelationSet relationSet = new javax.accessibility.AccessibleRelationSet();
int count = unoAccessibleRelationSet.getRelationCount();
for (int i = 0; i < count; i++) {
@@ -655,68 +655,68 @@ public class Table extends DescendantManager implements javax.accessibility.Acce
return null;
}
}
-
+
/** Gets the AccessibleComponent associated with this object that has a graphical representation */
public javax.accessibility.AccessibleComponent getAccessibleComponent() {
try {
XAccessibleComponent unoAccessibleComponent = (XAccessibleComponent)
UnoRuntime.queryInterface(XAccessibleComponent.class, unoAccessibleContext);
- return (unoAccessibleComponent != null) ?
+ return (unoAccessibleComponent != null) ?
new AccessibleComponentImpl(unoAccessibleComponent) : null;
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Gets the AccessibleAction associated with this object that has a graphical representation */
public javax.accessibility.AccessibleAction getAccessibleAction() {
try {
XAccessibleAction unoAccessibleAction = (XAccessibleAction)
UnoRuntime.queryInterface(XAccessibleAction.class, unoAccessibleContext);
- return (unoAccessibleAction != null) ?
+ return (unoAccessibleAction != null) ?
new AccessibleActionImpl(unoAccessibleAction) : null;
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Gets the AccessibleText associated with this object that has a graphical representation */
public javax.accessibility.AccessibleText getAccessibleText() {
-
+
if (disposed)
return null;
-
+
try {
XAccessibleText unoAccessibleText = (XAccessibleText)
UnoRuntime.queryInterface(XAccessibleText.class, unoAccessibleContext);
- return (unoAccessibleText != null) ?
+ return (unoAccessibleText != null) ?
new AccessibleTextImpl(unoAccessibleText) : null;
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Gets the AccessibleValue associated with this object that has a graphical representation */
public javax.accessibility.AccessibleValue getAccessibleValue() {
try {
XAccessibleValue unoAccessibleValue = (XAccessibleValue)
UnoRuntime.queryInterface(XAccessibleValue.class, unoAccessibleContext);
- return (unoAccessibleValue != null) ?
+ return (unoAccessibleValue != null) ?
new AccessibleValueImpl(unoAccessibleValue) : null;
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Gets the AccessibleText associated with this object presenting text on the display */
public javax.accessibility.AccessibleIcon[] getAccessibleIcon() {
try {
- XAccessibleImage unoAccessibleImage = (XAccessibleImage)
+ XAccessibleImage unoAccessibleImage = (XAccessibleImage)
UnoRuntime.queryInterface(XAccessibleImage.class, unoAccessibleContext);
if (unoAccessibleImage != null) {
javax.accessibility.AccessibleIcon[] icons = { new AccessibleIconImpl(unoAccessibleImage) };
return icons;
- }
+ }
} catch (com.sun.star.uno.RuntimeException e) {
}
return null;
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/TextComponent.java b/accessibility/bridge/org/openoffice/java/accessibility/TextComponent.java
index a142297c4c12..86fa4e60428e 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/TextComponent.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/TextComponent.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
@@ -30,20 +30,20 @@ package org.openoffice.java.accessibility;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.accessibility.*;
-/**
+/**
*/
public class TextComponent extends Component implements javax.accessibility.Accessible {
-
+
protected TextComponent(XAccessible xAccessible, XAccessibleContext xAccessibleContext) {
super(xAccessible, xAccessibleContext);
}
-
+
protected class AccessibleTextComponentListener extends AccessibleUNOComponentListener {
-
+
protected AccessibleTextComponentListener() {
super();
}
-
+
protected void setComponentState(short state, boolean enable) {
switch (state) {
case AccessibleStateType.EDITABLE:
@@ -60,42 +60,42 @@ public class TextComponent extends Component implements javax.accessibility.Acce
}
}
}
-
+
protected XAccessibleEventListener createEventListener() {
return new AccessibleTextComponentListener();
}
-
+
/** Creates the AccessibleContext associated with this object */
public javax.accessibility.AccessibleContext createAccessibleContext() {
return new AccessibleTextComponent();
}
-
+
protected class AccessibleTextComponent extends AccessibleUNOComponent {
-
+
/**
* Though the class is abstract, this should be called by all sub-classes
*/
protected AccessibleTextComponent() {
super();
}
-
+
/*
* AccessibleContext
*/
-
+
/** Gets the role of this object */
public javax.accessibility.AccessibleRole getAccessibleRole() {
return javax.accessibility.AccessibleRole.TEXT;
}
-
+
/** Gets the AccessibleText associated with this object presenting text on the display */
public javax.accessibility.AccessibleText getAccessibleText() {
-
+
if (disposed)
return null;
-
+
try {
- XAccessibleText unoAccessibleText = (XAccessibleText)
+ XAccessibleText unoAccessibleText = (XAccessibleText)
UnoRuntime.queryInterface(XAccessibleText.class,unoAccessibleComponent);
if (unoAccessibleText != null) {
return new AccessibleTextImpl(unoAccessibleText);
@@ -106,11 +106,11 @@ public class TextComponent extends Component implements javax.accessibility.Acce
return null;
}
}
-
+
/** Gets the AccessibleEditableText associated with this object presenting text on the display */
public javax.accessibility.AccessibleEditableText getAccessibleEditableText() {
try {
- XAccessibleEditableText unoAccessibleText = (XAccessibleEditableText)
+ XAccessibleEditableText unoAccessibleText = (XAccessibleEditableText)
UnoRuntime.queryInterface(XAccessibleEditableText.class,unoAccessibleComponent);
if (unoAccessibleText != null) {
return new AccessibleEditableTextImpl(unoAccessibleText);
@@ -121,28 +121,28 @@ public class TextComponent extends Component implements javax.accessibility.Acce
return null;
}
}
-
+
/** Gets the AccessibleAction associated with this object that has a graphical representation */
public javax.accessibility.AccessibleAction getAccessibleAction() {
try {
XAccessibleAction unoAccessibleAction = (XAccessibleAction)
UnoRuntime.queryInterface(XAccessibleAction.class, unoAccessibleComponent);
- return (unoAccessibleAction != null) ?
+ return (unoAccessibleAction != null) ?
new AccessibleActionImpl(unoAccessibleAction) : null;
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Returns the relation set of this object */
public javax.accessibility.AccessibleRelationSet getAccessibleRelationSet() {
try {
- XAccessibleRelationSet unoAccessibleRelationSet =
+ XAccessibleRelationSet unoAccessibleRelationSet =
unoAccessible.getAccessibleContext().getAccessibleRelationSet();
if (unoAccessibleRelationSet == null) {
return super.getAccessibleRelationSet();
}
-
+
javax.accessibility.AccessibleRelationSet relationSet = new javax.accessibility.AccessibleRelationSet();
int count = unoAccessibleRelationSet.getRelationCount();
for (int i = 0; i < count; i++) {
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/ToggleButton.java b/accessibility/bridge/org/openoffice/java/accessibility/ToggleButton.java
index bac8035a2ece..ff8c871373cf 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/ToggleButton.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/ToggleButton.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/bridge/org/openoffice/java/accessibility/ToolTip.java b/accessibility/bridge/org/openoffice/java/accessibility/ToolTip.java
index 071a6a37fd98..9391d0f6cc87 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/ToolTip.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/ToolTip.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
@@ -58,10 +58,10 @@ public class ToolTip extends Component implements javax.accessibility.Accessible
/** Gets the AccessibleText associated with this object presenting text on the display */
public javax.accessibility.AccessibleText getAccessibleText() {
-
+
if (disposed)
return null;
-
+
try {
XAccessibleText unoAccessibleText = (XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class,
unoAccessibleComponent);
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Tree.java b/accessibility/bridge/org/openoffice/java/accessibility/Tree.java
index 5fdd5a196397..b93752679190 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/Tree.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/Tree.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,18 +35,18 @@ import com.sun.star.uno.UnoRuntime;
import com.sun.star.accessibility.*;
public class Tree extends DescendantManager implements javax.accessibility.Accessible {
-
+
protected Tree(XAccessible xAccessible, XAccessibleContext xAccessibleContext) {
super(xAccessible, xAccessibleContext);
}
-
+
protected void setActiveDescendant(javax.accessibility.Accessible descendant) {
javax.accessibility.Accessible oldAD = activeDescendant;
activeDescendant = descendant;
- firePropertyChange(AccessibleContext.ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY,
+ firePropertyChange(AccessibleContext.ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY,
oldAD, descendant);
}
-
+
protected void setActiveDescendant(Object any) {
javax.accessibility.Accessible descendant = null;
try {
@@ -62,28 +62,28 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces
} catch (com.sun.star.lang.IllegalArgumentException e) {
}
}
-
+
protected void add(XAccessible unoAccessible) {
if (unoAccessible != null) {
firePropertyChange(AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
null, new TreeItem(unoAccessible));
}
}
-
+
protected void remove(XAccessible unoAccessible) {
if (unoAccessible != null) {
firePropertyChange(AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
new TreeItem(unoAccessible), null);
}
}
-
+
protected void add(Object any) {
try {
add((XAccessible) AnyConverter.toObject(AccessibleObjectFactory.XAccessibleType, any));
} catch (com.sun.star.lang.IllegalArgumentException e) {
}
}
-
+
protected void remove(Object any) {
try {
remove((XAccessible) AnyConverter.toObject(AccessibleObjectFactory.XAccessibleType, any));
@@ -95,11 +95,11 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces
* Update the proxy objects appropriatly on property change events
*/
protected class AccessibleTreeListener extends AccessibleDescendantManagerListener {
-
+
protected AccessibleTreeListener() {
super();
}
-
+
/** Called by OpenOffice process to notify property changes */
public void notifyEvent(AccessibleEventObject event) {
switch (event.EventId) {
@@ -130,20 +130,20 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces
}
}
}
-
+
protected XAccessibleEventListener createEventListener() {
return new AccessibleTreeListener();
}
-
+
/** Creates the AccessibleContext associated with this object */
public javax.accessibility.AccessibleContext createAccessibleContext() {
return new AccessibleTree();
}
-
+
protected class AccessibleTree extends AccessibleDescendantManager implements javax.accessibility.AccessibleExtendedTable {
protected XAccessibleTable unoAccessibleTable;
-
+
public AccessibleTree() {
unoAccessibleTable = (XAccessibleTable) UnoRuntime.queryInterface(XAccessibleTable.class, unoAccessibleContext);
}
@@ -151,7 +151,7 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces
/*
* AccessibleContext
*/
-
+
/** Gets the role of this object */
public javax.accessibility.AccessibleRole getAccessibleRole() {
return javax.accessibility.AccessibleRole.TREE;
@@ -161,7 +161,7 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces
public javax.accessibility.AccessibleTable getAccessibleTable() {
return ( unoAccessibleTable != null ) ? this : null;
}
-
+
/** Returns the specified Accessible child of the object */
public javax.accessibility.Accessible getAccessibleChild(int i) {
javax.accessibility.Accessible child = null;
@@ -185,8 +185,8 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces
/*
* AccessibleComponent
*/
-
- /** Returns the Accessible child, if one exists, contained at the local coordinate Point */
+
+ /** Returns the Accessible child, if one exists, contained at the local coordinate Point */
public javax.accessibility.Accessible getAccessibleAt(java.awt.Point p) {
javax.accessibility.Accessible child = null;
try {
@@ -205,11 +205,11 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces
}
return child;
}
-
+
/*
* AccessibleSelection
*/
-
+
/** Returns an Accessible representing the specified selected child of the object */
public javax.accessibility.Accessible getAccessibleSelection(int i) {
javax.accessibility.Accessible child = null;
@@ -229,11 +229,11 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces
}
return child;
}
-
+
/*
* AccessibleTable
*/
-
+
/** Returns the Accessible at a specified row and column in the table. */
public javax.accessibility.Accessible getAccessibleAt(int r, int c) {
javax.accessibility.Accessible child = null;
@@ -252,7 +252,7 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces
} catch (com.sun.star.uno.RuntimeException e) {
}
return child;
- }
+ }
/** Returns the caption for the table. */
public javax.accessibility.Accessible getAccessibleCaption() {
@@ -281,7 +281,7 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces
}
}
- /**
+ /**
* Returns the number of columns occupied by the Accessible
* at a specified row and column in the table.
*/
@@ -323,7 +323,7 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces
}
/**
- * Returns the number of rows occupied by the Accessible
+ * Returns the number of rows occupied by the Accessible
* at a specified row and column in the table.
*/
public int getAccessibleRowExtentAt(int r, int c) {
@@ -388,9 +388,9 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces
}
}
- /**
- * Returns a boolean value indicating whether the accessible
- * at a specified row and column is selected.
+ /**
+ * Returns a boolean value indicating whether the accessible
+ * at a specified row and column is selected.
*/
public boolean isAccessibleSelected(int r, int c) {
try {
@@ -465,15 +465,15 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces
}
}
}
-
+
class TreeItem extends java.awt.Component implements javax.accessibility.Accessible {
-
+
protected XAccessible unoAccessible;
-
+
public TreeItem(XAccessible xAccessible) {
unoAccessible = xAccessible;
}
-
+
public Object[] create(Object[] targetSet) {
try {
java.util.ArrayList list = new java.util.ArrayList(targetSet.length);
@@ -490,9 +490,9 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces
return null;
}
}
-
+
javax.accessibility.AccessibleContext accessibleContext = null;
-
+
/** Returns the AccessibleContext associated with this object */
public javax.accessibility.AccessibleContext getAccessibleContext() {
if (accessibleContext == null) {
@@ -510,19 +510,19 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces
}
return accessibleContext;
}
-
- protected class AccessibleTreeItem extends javax.accessibility.AccessibleContext
+
+ protected class AccessibleTreeItem extends javax.accessibility.AccessibleContext
implements javax.accessibility.AccessibleSelection {
-
+
XAccessibleContext unoAccessibleContext;
XAccessibleSelection unoAccessibleSelection;
-
+
public AccessibleTreeItem(XAccessibleContext xAccessibleContext) {
unoAccessibleContext = xAccessibleContext;
- unoAccessibleSelection = (XAccessibleSelection)
+ unoAccessibleSelection = (XAccessibleSelection)
UnoRuntime.queryInterface(XAccessibleSelection.class, xAccessibleContext);
}
-
+
/** Returns the accessible name of this object */
public String getAccessibleName() {
try {
@@ -531,12 +531,12 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces
return null;
}
}
-
+
/** Sets the accessible name of this object */
public void setAccessibleName(String name) {
// Not supported
}
-
+
/** Returns the accessible name of this object */
public String getAccessibleDescription() {
try {
@@ -545,12 +545,12 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces
return null;
}
}
-
+
/** Sets the accessible name of this object */
public void setAccessibleDescription(String name) {
// Not supported
}
-
+
/** Returns the accessible role of this object */
public javax.accessibility.AccessibleRole getAccessibleRole() {
try {
@@ -561,7 +561,7 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces
return null;
}
}
-
+
/** Gets the locale of the component */
public java.util.Locale getLocale() throws java.awt.IllegalComponentStateException {
try {
@@ -573,16 +573,16 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces
return Tree.this.getLocale();
}
}
-
+
/** Gets the 0-based index of this object in its accessible parent */
public int getAccessibleIndexInParent() {
try {
return unoAccessibleContext.getAccessibleIndexInParent();
} catch (com.sun.star.uno.RuntimeException e) {
return -1;
- }
+ }
}
-
+
/** Returns the number of accessible children of the object. */
public int getAccessibleChildrenCount() {
try {
@@ -591,7 +591,7 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces
return 0;
}
}
-
+
/** Returns the specified Accessible child of the object. */
public javax.accessibility.Accessible getAccessibleChild(int i) {
javax.accessibility.Accessible child = null;
@@ -609,7 +609,7 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces
}
return child;
}
-
+
/** Returns the state set of this object */
public javax.accessibility.AccessibleStateSet getAccessibleStateSet() {
try {
@@ -619,82 +619,82 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces
return AccessibleStateAdapter.getDefunctStateSet();
}
}
-
+
/** Gets the AccessibleComponent associated with this object that has a graphical representation */
public javax.accessibility.AccessibleComponent getAccessibleComponent() {
try {
XAccessibleComponent unoAccessibleComponent = (XAccessibleComponent)
UnoRuntime.queryInterface(XAccessibleComponent.class, unoAccessibleContext);
- return (unoAccessibleComponent != null) ?
+ return (unoAccessibleComponent != null) ?
new AccessibleComponentImpl(unoAccessibleComponent) : null;
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Returns the AccessibleSelection interface for this object */
public javax.accessibility.AccessibleSelection getAccessibleSelection() {
return (unoAccessibleSelection != null) ? this : null;
}
-
+
/** Gets the AccessibleAction associated with this object that has a graphical representation */
public javax.accessibility.AccessibleAction getAccessibleAction() {
try {
XAccessibleAction unoAccessibleAction = (XAccessibleAction)
UnoRuntime.queryInterface(XAccessibleAction.class, unoAccessibleContext);
- return (unoAccessibleAction != null) ?
+ return (unoAccessibleAction != null) ?
new AccessibleActionImpl(unoAccessibleAction) : null;
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Gets the AccessibleText associated with this object that has a graphical representation */
public javax.accessibility.AccessibleText getAccessibleText() {
-
+
if (disposed)
return null;
-
+
try {
XAccessibleText unoAccessibleText = (XAccessibleText)
UnoRuntime.queryInterface(XAccessibleText.class, unoAccessibleContext);
- return (unoAccessibleText != null) ?
+ return (unoAccessibleText != null) ?
new AccessibleTextImpl(unoAccessibleText) : null;
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Gets the AccessibleValue associated with this object that has a graphical representation */
public javax.accessibility.AccessibleValue getAccessibleValue() {
try {
XAccessibleValue unoAccessibleValue = (XAccessibleValue)
UnoRuntime.queryInterface(XAccessibleValue.class, unoAccessibleContext);
- return (unoAccessibleValue != null) ?
+ return (unoAccessibleValue != null) ?
new AccessibleValueImpl(unoAccessibleValue) : null;
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Gets the AccessibleText associated with this object presenting text on the display */
public javax.accessibility.AccessibleIcon[] getAccessibleIcon() {
try {
- XAccessibleImage unoAccessibleImage = (XAccessibleImage)
+ XAccessibleImage unoAccessibleImage = (XAccessibleImage)
UnoRuntime.queryInterface(XAccessibleImage.class, unoAccessibleContext);
if (unoAccessibleImage != null) {
javax.accessibility.AccessibleIcon[] icons = { new AccessibleIconImpl(unoAccessibleImage) };
return icons;
- }
+ }
} catch (com.sun.star.uno.RuntimeException e) {
}
return null;
}
-
+
/*
* AccessibleSelection
*/
-
+
/** Returns an Accessible representing the specified selected child of the object */
public javax.accessibility.Accessible getAccessibleSelection(int i) {
javax.accessibility.Accessible child = null;
@@ -708,7 +708,7 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces
}
return child;
}
-
+
/** Adds the specified Accessible child of the object to the object's selection */
public void addAccessibleSelection(int i) {
try {
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Window.java b/accessibility/bridge/org/openoffice/java/accessibility/Window.java
index ef44c3380a48..22a701963960 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/Window.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/Window.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
@@ -32,17 +32,17 @@ import com.sun.star.accessibility.*;
public class Window extends java.awt.Window implements javax.accessibility.Accessible, NativeFrame {
protected XAccessibleComponent unoAccessibleComponent;
-
+
boolean opened = false;
boolean visible = false;
-
+
java.awt.EventQueue eventQueue = null;
-
+
public Window(java.awt.Window owner, XAccessibleComponent xAccessibleComponent) {
super(owner);
initialize(xAccessibleComponent);
}
-
+
private void initialize(XAccessibleComponent xAccessibleComponent) {
unoAccessibleComponent = xAccessibleComponent;
eventQueue = java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue();
@@ -53,27 +53,27 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces
broadcaster.addEventListener(new AccessibleWindowListener());
}
}
-
+
java.awt.Component initialComponent = null;
-
+
public java.awt.Component getInitialComponent() {
if (Build.DEBUG) {
System.err.println("returning initial component object of class: " + initialComponent.getClass().getName());
}
return initialComponent;
}
-
+
public void setInitialComponent(java.awt.Component c) {
initialComponent = c;
}
-
+
public Integer getHWND() {
return null;
}
-
+
/**
- * Determines whether this <code>Component</code> is showing on screen.
- * This means that the component must be visible, and it must be in a
+ * Determines whether this <code>Component</code> is showing on screen.
+ * This means that the component must be visible, and it must be in a
* <code>container</code> that is visible and showing.
* @see #addNotify
* @see #removeNotify
@@ -86,10 +86,10 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces
}
return false;
}
-
+
/**
* Makes this <code>Component</code> displayable by connecting it to a
- * native screen resource.
+ * native screen resource.
* This method is called internally by the toolkit and should
* not be called directly by programs.
* @see #isDisplayable
@@ -99,10 +99,10 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces
public void addNotify() {
// createHierarchyEvents(0, null, null, 0, false);
}
-
- /**
+
+ /**
* Makes this <code>Component</code> undisplayable by destroying it native
- * screen resource.
+ * screen resource.
* This method is called by the toolkit internally and should
* not be called directly by programs.
* @see #isDisplayable
@@ -111,7 +111,7 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces
*/
public void removeNotify() {
}
-
+
/**
* Determines if the object is visible. Note: this means that the
* object intends to be visible; however, it may not in fact be
@@ -124,7 +124,7 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces
public boolean isVisible(){
return visible;
}
-
+
/**
* Shows or hides this component depending on the value of parameter
* <code>b</code>.
@@ -148,41 +148,41 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces
}
}
}
-
+
public void dispose() {
setVisible(false);
postWindowEvent(java.awt.event.WindowEvent.WINDOW_CLOSED);
-
+
// Transfer window focus back to the owner window if it is still the active frame
if ((getOwner() instanceof Frame && ((Frame) getOwner()).active) ||
(getOwner() instanceof Dialog && ((Dialog) getOwner()).active)) {
- eventQueue.postEvent(new java.awt.event.WindowEvent(getOwner(),
+ eventQueue.postEvent(new java.awt.event.WindowEvent(getOwner(),
java.awt.event.WindowEvent.WINDOW_GAINED_FOCUS));
}
}
-
+
protected void postWindowEvent(int i) {
eventQueue.postEvent(new java.awt.event.WindowEvent(this, i));
}
-
+
protected void postComponentEvent(int i) {
eventQueue.postEvent(new java.awt.event.ComponentEvent(this, i));
}
-
+
/**
* Update the proxy objects appropriatly on property change events
*/
protected class AccessibleWindowListener implements XAccessibleEventListener {
-
+
protected AccessibleWindowListener() {
}
-
+
// The only expected state changes are ACTIVE and VISIBLE
protected void setComponentState(short state, boolean enable) {
switch (state) {
case AccessibleStateType.ICONIFIED:
- postWindowEvent(enable ?
- java.awt.event.WindowEvent.WINDOW_ICONIFIED :
+ postWindowEvent(enable ?
+ java.awt.event.WindowEvent.WINDOW_ICONIFIED :
java.awt.event.WindowEvent.WINDOW_DEICONIFIED);
break;
case AccessibleStateType.SHOWING:
@@ -196,7 +196,7 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces
break;
}
}
-
+
/** Updates the accessible name and fires the appropriate PropertyChangedEvent */
protected void handleNameChangedEvent(Object any) {
try {
@@ -210,7 +210,7 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces
} catch (com.sun.star.lang.IllegalArgumentException e) {
}
}
-
+
/** Updates the accessible description and fires the appropriate PropertyChangedEvent */
protected void handleDescriptionChangedEvent(Object any) {
try {
@@ -223,21 +223,21 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces
} catch (com.sun.star.lang.IllegalArgumentException e) {
}
}
-
+
/** Updates the internal states and fires the appropriate PropertyChangedEvent */
protected void handleStateChangedEvent(Object any1, Object any2) {
try {
if (AnyConverter.isShort(any1)) {
setComponentState(AnyConverter.toShort(any1), false);
}
-
+
if (AnyConverter.isShort(any2)) {
setComponentState(AnyConverter.toShort(any2), true);
}
} catch (com.sun.star.lang.IllegalArgumentException e) {
}
}
-
+
/** Fires a visible data property change event */
protected void handleVisibleDataEvent() {
javax.accessibility.AccessibleContext ac = accessibleContext;
@@ -245,7 +245,7 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces
ac.firePropertyChange(javax.accessibility.AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null);
}
}
-
+
/** Called by OpenOffice process to notify property changes */
public void notifyEvent(AccessibleEventObject event) {
switch (event.EventId) {
@@ -281,14 +281,14 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces
}
}
}
-
+
/** Called by OpenOffice process to notify that the UNO component is disposing */
public void disposing(com.sun.star.lang.EventObject eventObject) {
}
}
-
+
protected javax.accessibility.AccessibleContext accessibleContext = null;
-
+
/** Returns the AccessibleContext associated with this object */
public javax.accessibility.AccessibleContext getAccessibleContext() {
if (accessibleContext == null) {
@@ -297,14 +297,14 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces
}
return accessibleContext;
}
-
+
protected class AccessibleWindow extends java.awt.Window.AccessibleAWTWindow {
protected AccessibleWindow() {
super();
}
-
+
protected java.awt.event.ComponentListener accessibleComponentHandler = null;
-
+
/**
* Fire PropertyChange listener, if one is registered,
* when shown/hidden..
@@ -315,33 +315,33 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces
javax.accessibility.AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
javax.accessibility.AccessibleState.VISIBLE, null);
}
-
+
public void componentShown(java.awt.event.ComponentEvent e) {
AccessibleWindow.this.firePropertyChange(
javax.accessibility.AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
null, javax.accessibility.AccessibleState.VISIBLE);
}
-
+
public void componentMoved(java.awt.event.ComponentEvent e) {
}
-
+
public void componentResized(java.awt.event.ComponentEvent e) {
}
} // inner class AccessibleComponentHandler
-
+
protected java.awt.event.ContainerListener accessibleContainerHandler = null;
-
+
/**
* Fire PropertyChange listener, if one is registered,
* when children added/removed.
*/
-
+
protected class AccessibleContainerHandler implements java.awt.event.ContainerListener {
public void componentAdded(java.awt.event.ContainerEvent e) {
java.awt.Component c = e.getChild();
if (c != null && c instanceof javax.accessibility.Accessible) {
AccessibleWindow.this.firePropertyChange(
- javax.accessibility.AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
+ javax.accessibility.AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
null, ((javax.accessibility.Accessible) c).getAccessibleContext());
}
}
@@ -349,14 +349,14 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces
java.awt.Component c = e.getChild();
if (c != null && c instanceof javax.accessibility.Accessible) {
AccessibleWindow.this.firePropertyChange(
- javax.accessibility.AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
- ((javax.accessibility.Accessible) c).getAccessibleContext(), null);
+ javax.accessibility.AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
+ ((javax.accessibility.Accessible) c).getAccessibleContext(), null);
}
}
}
-
+
protected int propertyChangeListenerCount = 0;
-
+
/**
* Add a PropertyChangeListener to the listener list.
*
@@ -366,13 +366,13 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces
if (propertyChangeListenerCount++ == 0) {
accessibleContainerHandler = new AccessibleContainerHandler();
Window.this.addContainerListener(accessibleContainerHandler);
-
+
accessibleComponentHandler = new AccessibleComponentHandler();
Window.this.addComponentListener(accessibleComponentHandler);
}
super.addPropertyChangeListener(listener);
}
-
+
/**
* Remove a PropertyChangeListener from the listener list.
* This removes a PropertyChangeListener that was registered
@@ -384,17 +384,17 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces
if (--propertyChangeListenerCount == 0) {
Window.this.removeComponentListener(accessibleComponentHandler);
accessibleComponentHandler = null;
-
+
Window.this.removeContainerListener(accessibleContainerHandler);
accessibleContainerHandler = null;
}
super.removePropertyChangeListener(listener);
}
-
+
/*
* AccessibleComponent
*/
-
+
/** Returns the background color of the object */
public java.awt.Color getBackground() {
try {
@@ -403,11 +403,11 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces
return null;
}
}
-
+
public void setBackground(java.awt.Color c) {
// Not supported by UNO accessibility API
}
-
+
/** Returns the foreground color of the object */
public java.awt.Color getForeground() {
try {
@@ -416,118 +416,118 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces
return null;
}
}
-
+
public void setForeground(java.awt.Color c) {
// Not supported by UNO accessibility API
}
-
+
public java.awt.Cursor getCursor() {
// Not supported by UNO accessibility API
return null;
}
-
+
public void setCursor(java.awt.Cursor cursor) {
// Not supported by UNO accessibility API
}
-
+
public java.awt.Font getFont() {
// FIXME
return null;
}
-
+
public void setFont(java.awt.Font f) {
// Not supported by UNO accessibility API
}
-
+
public java.awt.FontMetrics getFontMetrics(java.awt.Font f) {
// FIXME
return null;
}
-
+
public boolean isEnabled() {
return Window.this.isEnabled();
}
-
+
public void setEnabled(boolean b) {
// Not supported by UNO accessibility API
}
-
+
public boolean isVisible() {
return Window.this.isVisible();
}
-
+
public void setVisible(boolean b) {
// Not supported by UNO accessibility API
}
-
+
public boolean isShowing() {
return Window.this.isShowing();
}
-
+
public boolean contains(java.awt.Point p) {
try {
- return unoAccessibleComponent.containsPoint(new com.sun.star.awt.Point(p.x, p.y));
+ return unoAccessibleComponent.containsPoint(new com.sun.star.awt.Point(p.x, p.y));
} catch (com.sun.star.uno.RuntimeException e) {
return false;
}
}
-
+
/** Returns the location of the object on the screen. */
public java.awt.Point getLocationOnScreen() {
try {
- com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocationOnScreen();
+ com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocationOnScreen();
return new java.awt.Point(unoPoint.X, unoPoint.Y);
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Gets the location of this component in the form of a point specifying the component's top-left corner */
public java.awt.Point getLocation() {
try {
- com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocationOnScreen();
+ com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocationOnScreen();
return new java.awt.Point( unoPoint.X, unoPoint.Y );
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Moves this component to a new location */
public void setLocation(java.awt.Point p) {
// Not supported by UNO accessibility API
}
-
+
/** Gets the bounds of this component in the form of a Rectangle object */
public java.awt.Rectangle getBounds() {
try {
- com.sun.star.awt.Rectangle unoRect = unoAccessibleComponent.getBounds();
+ com.sun.star.awt.Rectangle unoRect = unoAccessibleComponent.getBounds();
return new java.awt.Rectangle(unoRect.X, unoRect.Y, unoRect.Width, unoRect.Height);
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Moves and resizes this component to conform to the new bounding rectangle r */
public void setBounds(java.awt.Rectangle r) {
// Not supported by UNO accessibility API
}
-
+
/** Returns the size of this component in the form of a Dimension object */
public java.awt.Dimension getSize() {
try {
- com.sun.star.awt.Size unoSize = unoAccessibleComponent.getSize();
+ com.sun.star.awt.Size unoSize = unoAccessibleComponent.getSize();
return new java.awt.Dimension(unoSize.Width, unoSize.Height);
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
-
+
/** Resizes this component so that it has width d.width and height d.height */
public void setSize(java.awt.Dimension d) {
// Not supported by UNO accessibility API
}
-
- /** Returns the Accessible child, if one exists, contained at the local coordinate Point */
+
+ /** Returns the Accessible child, if one exists, contained at the local coordinate Point */
public javax.accessibility.Accessible getAccessibleAt(java.awt.Point p) {
try {
java.awt.Component c = AccessibleObjectFactory.getAccessibleComponent(
@@ -538,11 +538,11 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces
return null;
}
}
-
+
public boolean isFocusTraversable() {
return Window.this.isFocusable();
}
-
+
public void requestFocus() {
unoAccessibleComponent.grabFocus();
}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleEventLog.java b/accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleEventLog.java
index 36bec1cab8fb..365243fe6fc8 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleEventLog.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleEventLog.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
@@ -34,28 +34,28 @@ import com.sun.star.uno.*;
*
*/
public class XAccessibleEventLog implements XAccessibleEventListener {
-
+
private static XAccessibleEventLog theEventListener = null;
-
+
private static java.util.Hashtable proxyList = new java.util.Hashtable();
-
+
/** Creates a new instance of UNOAccessibleEventListener */
public XAccessibleEventLog() {
}
-
+
private static XAccessibleEventListener get() {
if (theEventListener == null) {
theEventListener = new XAccessibleEventLog();
}
return theEventListener;
}
-
+
public static void addEventListener(XAccessibleContext xac, java.awt.Component c) {
XAccessibleEventBroadcaster broadcaster = (XAccessibleEventBroadcaster)
UnoRuntime.queryInterface(XAccessibleEventBroadcaster.class, xac);
if (broadcaster != null) {
broadcaster.addEventListener(XAccessibleEventLog.get());
-
+
// remember the proxy objects
synchronized (proxyList) {
// proxyList.put(UnoRuntime.generateOid(xac), new WeakReference(c));
@@ -65,8 +65,8 @@ public class XAccessibleEventLog implements XAccessibleEventListener {
}
public void disposing(com.sun.star.lang.EventObject eventObject) {
- }
-
+ }
+
public void notifyEvent(com.sun.star.accessibility.AccessibleEventObject accessibleEventObject) {
switch (accessibleEventObject.EventId) {
case AccessibleEventId.ACTIVE_DESCENDANT_CHANGED:
@@ -74,7 +74,7 @@ public class XAccessibleEventLog implements XAccessibleEventListener {
break;
case AccessibleEventId.STATE_CHANGED:
logStateChange(accessibleEventObject.Source,
- accessibleEventObject.OldValue,
+ accessibleEventObject.OldValue,
accessibleEventObject.NewValue);
break;
case AccessibleEventId.CHILD:
@@ -93,7 +93,7 @@ public class XAccessibleEventLog implements XAccessibleEventListener {
break;
}
}
-
+
public void logStateChange(Object o, Object any1, Object any2) {
try {
if (AnyConverter.isShort(any1)) {
@@ -106,7 +106,7 @@ public class XAccessibleEventLog implements XAccessibleEventListener {
} catch (com.sun.star.lang.IllegalArgumentException e) {
}
}
-
+
public void logStateChange(Object o, short n, String s) {
switch(n) {
case AccessibleStateType.ACTIVE:
@@ -144,13 +144,13 @@ public class XAccessibleEventLog implements XAccessibleEventListener {
break;
}
}
-
+
protected static void logMessage(Object o, String s) {
XAccessibleContext xac = (XAccessibleContext) UnoRuntime.queryInterface(XAccessibleContext.class, o);
if( xac != null ) {
String oid = UnoRuntime.generateOid(xac);
synchronized (proxyList) {
- logMessage( (javax.accessibility.Accessible) proxyList.get( oid ), s );
+ logMessage( (javax.accessibility.Accessible) proxyList.get( oid ), s );
// WeakReference r = (WeakReference) proxyList.get( oid );
// if(r != null) {
// System.err.println( "*** Warning *** event is " + r.get() );
@@ -159,7 +159,7 @@ public class XAccessibleEventLog implements XAccessibleEventListener {
// System.err.println( "*** Warning *** event source not found in broadcaster list" );
// }
}
- } else
+ } else
System.err.println( "*** Warning *** event source does not implement XAccessibleContext" );
}
@@ -170,16 +170,16 @@ public class XAccessibleEventLog implements XAccessibleEventListener {
logMessage(s);
}
}
-
+
protected static void logMessage(javax.accessibility.AccessibleContext ac, String s) {
if (ac != null) {
- logMessage("[" + ac.getAccessibleRole() + "] "
+ logMessage("[" + ac.getAccessibleRole() + "] "
+ ac.getAccessibleName() + ": " + s);
} else {
logMessage(s);
}
}
-
+
protected static void logMessage(String s) {
System.err.println(s);
}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleHypertextLog.java b/accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleHypertextLog.java
index f14da6d8280b..13e9b2f6d222 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleHypertextLog.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleHypertextLog.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
@@ -31,12 +31,12 @@ import com.sun.star.accessibility.*;
import com.sun.star.uno.*;
/** The AccessibleHypertextImpl mapps all calls to the java AccessibleHypertext
- * interface to the corresponding methods of the UNO XAccessibleHypertext
+ * interface to the corresponding methods of the UNO XAccessibleHypertext
* interface.
*/
public class XAccessibleHypertextLog extends XAccessibleTextLog
implements com.sun.star.accessibility.XAccessibleHypertext {
-
+
private com.sun.star.accessibility.XAccessibleHypertext unoObject;
/** Creates a new instance of XAccessibleTextLog */
@@ -45,15 +45,15 @@ public class XAccessibleHypertextLog extends XAccessibleTextLog
unoObject = xAccessibleHypertext;
}
- public XAccessibleHyperlink getHyperLink(int param)
+ public XAccessibleHyperlink getHyperLink(int param)
throws com.sun.star.lang.IndexOutOfBoundsException {
return unoObject.getHyperLink(param);
}
-
+
public int getHyperLinkCount() {
return unoObject.getHyperLinkCount();
}
-
+
public int getHyperLinkIndex(int param)
throws com.sun.star.lang.IndexOutOfBoundsException {
return unoObject.getHyperLinkIndex(param);
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleTextLog.java b/accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleTextLog.java
index 4b415ee60c74..b7a2ffc70ebf 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleTextLog.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleTextLog.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
@@ -181,7 +181,7 @@ public class XAccessibleTextLog
public com.sun.star.accessibility.TextSegment getTextAtIndex(int param,
short param1)
- throws com.sun.star.lang.IndexOutOfBoundsException,
+ throws com.sun.star.lang.IndexOutOfBoundsException,
com.sun.star.lang.IllegalArgumentException {
try {
com.sun.star.accessibility.TextSegment ts = unoObject.getTextAtIndex(param,
@@ -205,7 +205,7 @@ public class XAccessibleTextLog
public com.sun.star.accessibility.TextSegment getTextBeforeIndex(
int param, short param1)
- throws com.sun.star.lang.IndexOutOfBoundsException,
+ throws com.sun.star.lang.IndexOutOfBoundsException,
com.sun.star.lang.IllegalArgumentException {
try {
com.sun.star.accessibility.TextSegment ts = unoObject.getTextBeforeIndex(param,
@@ -230,7 +230,7 @@ public class XAccessibleTextLog
public com.sun.star.accessibility.TextSegment getTextBehindIndex(
int param, short param1)
- throws com.sun.star.lang.IndexOutOfBoundsException,
+ throws com.sun.star.lang.IndexOutOfBoundsException,
com.sun.star.lang.IllegalArgumentException {
try {
com.sun.star.accessibility.TextSegment ts = unoObject.getTextBehindIndex(param,