1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 package ifc.form.component;
25 
26 import lib.MultiPropertyTest;
27 
28 /**
29 * Testing <code>com.sun.star.form.component.GridControl</code>
30 * service properties :
31 * <ul>
32 *  <li><code> Border</code></li>
33 *  <li><code> Enabled</code></li>
34 *  <li><code> FontDescriptor</code></li>
35 *  <li><code> RowHeight</code></li>
36 *  <li><code> Tabstop</code></li>
37 *  <li><code> TextColor</code></li>
38 * </ul>
39 * Properties testing is automated by <code>lib.MultiPropertyTest</code>.
40 * @see com.sun.star.form.component.GridControl
41 */
42 public class _GridControl extends MultiPropertyTest {
43 
44     /**
45     * This property can be void, so if old value is <code> null </code>
46     * new value must be specified.
47     */
_RowHeight()48     public void _RowHeight() {
49         testProperty("RowHeight", new PropertyTester() {
50             protected Object getNewValue(String prop, Object old) {
51                 return util.utils.isVoid(old) ? new Integer(11) :
52                     super.getNewValue(prop, old) ;
53             }
54         }) ;
55     }
56 
57     /**
58     * This property can be void, so if old value is <code> null </code>
59     * new value must be specified.
60     */
_Tabstop()61     public void _Tabstop() {
62         testProperty("Tabstop", new PropertyTester() {
63             protected Object getNewValue(String prop, Object old) {
64                 return util.utils.isVoid(old) ? new Boolean(true) :
65                     super.getNewValue(prop, old) ;
66             }
67         }) ;
68     }
69 
70     /**
71     * This property can be void, so if old value is <code> null </code>
72     * new value must be specified.
73     */
_TextColor()74     public void _TextColor() {
75         testProperty("TextColor", new PropertyTester() {
76             protected Object getNewValue(String prop, Object old) {
77                 return util.utils.isVoid(old) ? new Integer(342) :
78                     super.getNewValue(prop, old) ;
79             }
80         }) ;
81     }
82 
83     /**
84     * This property can be void, so if old value is <code> null </code>
85     * new value must be specified.
86     */
_BorderColor()87     public void _BorderColor() {
88         testProperty("BorderColor", new PropertyTester() {
89             protected Object getNewValue(String prop, Object old) {
90                 return util.utils.isVoid(old) ? new Integer(342) :
91                     super.getNewValue(prop, old) ;
92             }
93         }) ;
94     }
95 }  // finish class _GridControl
96 
97 
98