merge the formfield patch from ooo-build
[ooovba.git] / qadevOOo / tests / java / ifc / awt / _UnoControlPatternFieldModel.java
blob2815c4c8ca98b61df13cbc64cbe0e904e6f0c93b
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: _UnoControlPatternFieldModel.java,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 package ifc.awt;
33 import lib.MultiPropertyTest;
34 import util.utils;
36 /**
37 * Testing <code>com.sun.star.awt.UnoControlPatternFieldModel</code>
38 * service properties :
39 * <ul>
40 * <li><code> BackgroundColor</code></li>
41 * <li><code> Border</code></li>
42 * <li><code> DefaultControl</code></li>
43 * <li><code> EditMask</code></li>
44 * <li><code> Enabled</code></li>
45 * <li><code> FontDescriptor</code></li>
46 * <li><code> LiteralMask</code></li>
47 * <li><code> Printable</code></li>
48 * <li><code> ReadOnly</code></li>
49 * <li><code> StrictFormat</code></li>
50 * <li><code> Tabstop</code></li>
51 * <li><code> Text</code></li>
52 * <li><code> TextColor</code></li>
53 * </ul> <p>
54 * Properties testing is automated by <code>lib.MultiPropertyTest</code>.
55 * @see com.sun.star.awt.UnoControlPatternFieldModel
57 public class _UnoControlPatternFieldModel extends MultiPropertyTest {
59 /**
60 * This property can be VOID, and in case if it is so new
61 * value must defined.
63 public void _BackgroundColor() {
64 testProperty("BackgroundColor", new PropertyTester() {
65 protected Object getNewValue(String p, Object old) {
66 return utils.isVoid(old) ? new Integer(1234) : null ;
68 }) ;
71 /**
72 * This property can be VOID, and in case if it is so new
73 * value must defined.
75 public void _BorderColor() {
76 testProperty("BorderColor", new PropertyTester() {
77 protected Object getNewValue(String p, Object old) {
78 return utils.isVoid(old) ? new Integer(1234) : null ;
80 }) ;
83 /**
84 * This property can be VOID, and in case if it is so new
85 * value must defined.
87 public void _TextColor() {
88 testProperty("TextColor", new PropertyTester() {
89 protected Object getNewValue(String p, Object old) {
90 return utils.isVoid(old) ? new Integer(4321) : null ;
92 }) ;
95 /**
96 * This property can be VOID, and in case if it is so new
97 * value must defined.
99 public void _TextLineColor() {
100 testProperty("TextLineColor", new PropertyTester() {
101 protected Object getNewValue(String p, Object old) {
102 return utils.isVoid(old) ? new Integer(4321) : null ;
104 }) ;
108 * This property can be VOID, and in case if it is so new
109 * value must defined.
111 public void _Tabstop() {
112 testProperty("Tabstop", new PropertyTester() {
113 protected Object getNewValue(String p, Object old) {
114 return utils.isVoid(old) ? new Boolean(true) : null ;
116 }) ;