From c13376f492be86d94efc082d402f85f424835d0e Mon Sep 17 00:00:00 2001 From: Oliver Braun Date: Fri, 16 Aug 2002 12:13:09 +0000 Subject: #100201#, #101302# completed JDK 1.4 interface and removed deadlocks --- .../java/accessibility/AccessibleKeyBinding.java | 403 +++++++++++++++++++++ .../accessibility/AccessibleObjectFactory.java | 151 +++++--- .../org/openoffice/java/accessibility/makefile.mk | 8 +- 3 files changed, 501 insertions(+), 61 deletions(-) create mode 100644 accessibility/bridge/org/openoffice/java/accessibility/AccessibleKeyBinding.java (limited to 'accessibility/bridge') diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleKeyBinding.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleKeyBinding.java new file mode 100644 index 000000000000..118b7588e5b8 --- /dev/null +++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleKeyBinding.java @@ -0,0 +1,403 @@ +/************************************************************************* + * + * $RCSfile: AccessibleKeyBinding.java,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: obr $ $Date: 2002-08-16 13:13:06 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +package org.openoffice.java.accessibility; + +import org.openoffice.accessibility.internal.*; + +/** + * + */ +public class AccessibleKeyBinding extends Object implements javax.accessibility.AccessibleKeyBinding { + + javax.swing.KeyStroke[] data; + + public AccessibleKeyBinding(KeyStroke[] keys) { + data = new javax.swing.KeyStroke[keys.length]; + + for(int i=0; i 0 ) - l.setText(info.Text); - else - l.setText(info.Name); - } - } - +/* public AccessibleObject removeAccessibleObject(XAccessible xAccessible) { XAccessibleContext xAccessibleContext = null; @@ -360,7 +362,7 @@ public class AccessibleObjectFactory { return null; } - +*/ public static XAccessible toXAccessible(Object any) { if(AnyConverter.isObject(any)) { try { @@ -375,6 +377,37 @@ public class AccessibleObjectFactory { return null; } + public java.lang.Object[] getAccessibleObjectSet(java.lang.Object o) { + java.lang.Object[] list = null; + + if( o instanceof java.lang.Object[] ) { + list = (java.lang.Object[]) o; + } else if( o instanceof com.sun.star.uno.Any && AnyConverter.isArray(o) ) { + try { + list = (java.lang.Object[]) AnyConverter.toArray(o); + } + + catch(com.sun.star.lang.IllegalArgumentException e) { + // this should never happen + } + } + + if( list != null ) { + java.util.ArrayList set = new java.util.ArrayList(list.length); + + for(int i=0; i