1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 package complex.toolkit.accessibility; 29 30 // import lib.MultiMethodTest; 31 import com.sun.star.accessibility.XAccessibleExtendedComponent; 32 // import com.sun.star.accessibility.XAccessibleStateSet; 33 // import com.sun.star.accessibility.AccessibleStateType; 34 import com.sun.star.awt.XFont; 35 import com.sun.star.uno.XInterface; 36 import com.sun.star.uno.UnoRuntime; 37 // import share.LogWriter; 38 39 /** 40 * Testing <code>com.sun.star.accessibility.XAccessibleExtendedComponent</code> 41 * interface methods : 42 * <ul> 43 * <li><code> getForeground()</code></li> 44 * <li><code> getBackground()</code></li> 45 * <li><code> getFont()</code></li> 46 * <li><code> isEnabled()</code></li> 47 * <li><code> getTitledBorderText()</code></li> 48 * <li><code> getToolTipText()</code></li> 49 * </ul> <p> 50 * @see com.sun.star.accessibility.XAccessibleExtendedComponent 51 */ 52 public class _XAccessibleExtendedComponent { 53 54 // private LogWriter log; 55 private static final String className = 56 "com.sun.star.accessibility.XAccessibleExtendedComponent" ; 57 58 public XAccessibleExtendedComponent oObj = null; 59 60 // temporary while accessibility package is in com.sun.star 61 protected String getTestedClassName() { 62 return className; 63 } 64 65 public _XAccessibleExtendedComponent(XInterface object/*, LogWriter log*/) { 66 oObj = UnoRuntime.queryInterface(XAccessibleExtendedComponent.class, object); 67 // this.log = log; 68 } 69 70 /** 71 * Just calls the method. 72 * @return 73 */ 74 public boolean _getFont() { 75 XFont font = oObj.getFont(); 76 System.out.println("getFont(): " + font); 77 return true; 78 } 79 80 /** 81 * Calls the method and checks returned value. 82 * Has OK status if returned value isn't null. 83 * @return 84 */ 85 public boolean _getTitledBorderText() { 86 String titleBorderText = oObj.getTitledBorderText(); 87 System.out.println("getTitledBorderText(): '" + titleBorderText + "'"); 88 return titleBorderText != null; 89 } 90 91 /** 92 * Calls the method and checks returned value. 93 * Has OK status if returned value isn't null. 94 * @return 95 */ 96 public boolean _getToolTipText() { 97 String toolTipText = oObj.getToolTipText(); 98 System.out.println("getToolTipText(): '" + toolTipText + "'"); 99 return toolTipText != null; 100 } 101 } 102