xref: /AOO41X/main/qadevOOo/tests/java/ifc/form/component/_GridControl.java (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
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 ifc.form.component;
29 
30 import lib.MultiPropertyTest;
31 
32 /**
33 * Testing <code>com.sun.star.form.component.GridControl</code>
34 * service properties :
35 * <ul>
36 *  <li><code> Border</code></li>
37 *  <li><code> Enabled</code></li>
38 *  <li><code> FontDescriptor</code></li>
39 *  <li><code> RowHeight</code></li>
40 *  <li><code> Tabstop</code></li>
41 *  <li><code> TextColor</code></li>
42 * </ul>
43 * Properties testing is automated by <code>lib.MultiPropertyTest</code>.
44 * @see com.sun.star.form.component.GridControl
45 */
46 public class _GridControl extends MultiPropertyTest {
47 
48     /**
49     * This property can be void, so if old value is <code> null </code>
50     * new value must be specified.
51     */
52     public void _RowHeight() {
53         testProperty("RowHeight", new PropertyTester() {
54             protected Object getNewValue(String prop, Object old) {
55                 return util.utils.isVoid(old) ? new Integer(11) :
56                     super.getNewValue(prop, old) ;
57             }
58         }) ;
59     }
60 
61     /**
62     * This property can be void, so if old value is <code> null </code>
63     * new value must be specified.
64     */
65     public void _Tabstop() {
66         testProperty("Tabstop", new PropertyTester() {
67             protected Object getNewValue(String prop, Object old) {
68                 return util.utils.isVoid(old) ? new Boolean(true) :
69                     super.getNewValue(prop, old) ;
70             }
71         }) ;
72     }
73 
74     /**
75     * This property can be void, so if old value is <code> null </code>
76     * new value must be specified.
77     */
78     public void _TextColor() {
79         testProperty("TextColor", new PropertyTester() {
80             protected Object getNewValue(String prop, Object old) {
81                 return util.utils.isVoid(old) ? new Integer(342) :
82                     super.getNewValue(prop, old) ;
83             }
84         }) ;
85     }
86 
87     /**
88     * This property can be void, so if old value is <code> null </code>
89     * new value must be specified.
90     */
91     public void _BorderColor() {
92         testProperty("BorderColor", new PropertyTester() {
93             protected Object getNewValue(String prop, Object old) {
94                 return util.utils.isVoid(old) ? new Integer(342) :
95                     super.getNewValue(prop, old) ;
96             }
97         }) ;
98     }
99 }  // finish class _GridControl
100 
101 
102