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.awt;
25 
26 import lib.MultiPropertyTest;
27 import util.utils;
28 
29 /**
30 * Testing <code>com.sun.star.awt.UnoControlPatternFieldModel</code>
31 * service properties :
32 * <ul>
33 *  <li><code> BackgroundColor</code></li>
34 *  <li><code> Border</code></li>
35 *  <li><code> DefaultControl</code></li>
36 *  <li><code> EditMask</code></li>
37 *  <li><code> Enabled</code></li>
38 *  <li><code> FontDescriptor</code></li>
39 *  <li><code> LiteralMask</code></li>
40 *  <li><code> Printable</code></li>
41 *  <li><code> ReadOnly</code></li>
42 *  <li><code> StrictFormat</code></li>
43 *  <li><code> Tabstop</code></li>
44 *  <li><code> Text</code></li>
45 *  <li><code> TextColor</code></li>
46 * </ul> <p>
47 * Properties testing is automated by <code>lib.MultiPropertyTest</code>.
48 * @see com.sun.star.awt.UnoControlPatternFieldModel
49 */
50 public class _UnoControlPatternFieldModel extends MultiPropertyTest {
51 
52     /**
53     * This property can be VOID, and in case if it is so new
54     * value must defined.
55     */
_BackgroundColor()56     public void _BackgroundColor() {
57         testProperty("BackgroundColor", new PropertyTester() {
58             protected Object getNewValue(String p, Object old) {
59                 return utils.isVoid(old) ? new Integer(1234) : null ;
60             }
61         }) ;
62     }
63 
64    /**
65     * This property can be VOID, and in case if it is so new
66     * value must defined.
67     */
_BorderColor()68     public void _BorderColor() {
69         testProperty("BorderColor", new PropertyTester() {
70             protected Object getNewValue(String p, Object old) {
71                 return utils.isVoid(old) ? new Integer(1234) : null ;
72             }
73         }) ;
74     }
75 
76     /**
77     * This property can be VOID, and in case if it is so new
78     * value must defined.
79     */
_TextColor()80     public void _TextColor() {
81         testProperty("TextColor", new PropertyTester() {
82             protected Object getNewValue(String p, Object old) {
83                 return utils.isVoid(old) ? new Integer(4321) : null ;
84             }
85         }) ;
86     }
87 
88     /**
89     * This property can be VOID, and in case if it is so new
90     * value must defined.
91     */
_TextLineColor()92     public void _TextLineColor() {
93         testProperty("TextLineColor", new PropertyTester() {
94             protected Object getNewValue(String p, Object old) {
95                 return utils.isVoid(old) ? new Integer(4321) : null ;
96             }
97         }) ;
98     }
99 
100     /**
101     * This property can be VOID, and in case if it is so new
102     * value must defined.
103     */
_Tabstop()104     public void _Tabstop() {
105         testProperty("Tabstop", new PropertyTester() {
106             protected Object getNewValue(String p, Object old) {
107                 return utils.isVoid(old) ? new Boolean(true) : null ;
108             }
109         }) ;
110     }
111 }
112 
113