1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: _UnoControlPatternFieldModel.java,v $
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 ************************************************************************/
33 import lib
.MultiPropertyTest
;
37 * Testing <code>com.sun.star.awt.UnoControlPatternFieldModel</code>
38 * service properties :
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>
54 * Properties testing is automated by <code>lib.MultiPropertyTest</code>.
55 * @see com.sun.star.awt.UnoControlPatternFieldModel
57 public class _UnoControlPatternFieldModel
extends MultiPropertyTest
{
60 * This property can be VOID, and in case if it is so new
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 ;
72 * This property can be VOID, and in case if it is so new
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 ;
84 * This property can be VOID, and in case if it is so new
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 ;
96 * This property can be VOID, and in case if it is so new
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 ;
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 ;