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: _UnoControlNumericFieldModel.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.UnoControlNumericFieldModel</code>
38 * service properties :
40 * <li><code> BackgroundColor</code></li>
41 * <li><code> Border</code></li>
42 * <li><code> DecimalAccuracy</code></li>
43 * <li><code> DefaultControl</code></li>
44 * <li><code> Enabled</code></li>
45 * <li><code> FontDescriptor</code></li>
46 * <li><code> ShowThousandsSeparator</code></li>
47 * <li><code> Printable</code></li>
48 * <li><code> ReadOnly</code></li>
49 * <li><code> Spin</code></li>
50 * <li><code> StrictFormat</code></li>
51 * <li><code> Tabstop</code></li>
52 * <li><code> TextColor</code></li>
53 * <li><code> Value</code></li>
54 * <li><code> ValueMax</code></li>
55 * <li><code> ValueMin</code></li>
56 * <li><code> ValueStep</code></li>
58 * Properties testing is automated by <code>lib.MultiPropertyTest</code>.
59 * @see com.sun.star.awt.UnoControlNumericFieldModel
61 public class _UnoControlNumericFieldModel
extends MultiPropertyTest
{
64 * This property can be VOID, and in case if it is so new
67 public void _BackgroundColor() {
68 testProperty("BackgroundColor", new PropertyTester() {
69 protected Object
getNewValue(String p
, Object old
) {
70 return utils
.isVoid(old
) ?
new Integer(1234) : null ;
76 * This property can be VOID, and in case if it is so new
79 public void _BorderColor() {
80 testProperty("BorderColor", new PropertyTester() {
81 protected Object
getNewValue(String p
, Object old
) {
82 return utils
.isVoid(old
) ?
new Integer(1234) : null ;
88 * This property can be VOID, and in case if it is so new
91 public void _TextColor() {
92 testProperty("TextColor", new PropertyTester() {
93 protected Object
getNewValue(String p
, Object old
) {
94 return utils
.isVoid(old
) ?
new Integer(4321) : null ;
100 * This property can be VOID, and in case if it is so new
101 * value must defined.
103 public void _TextLineColor() {
104 testProperty("TextLineColor", new PropertyTester() {
105 protected Object
getNewValue(String p
, Object old
) {
106 return utils
.isVoid(old
) ?
new Integer(4321) : null ;
112 * This property can be VOID, and in case if it is so new
113 * value must defined.
115 public void _Tabstop() {
116 testProperty("Tabstop", new PropertyTester() {
117 protected Object
getNewValue(String p
, Object old
) {
118 return utils
.isVoid(old
) ?
new Boolean(true) : null ;
124 * This property can be VOID, and in case if it is so new
125 * value must defined.
127 public void _Value() {
128 testProperty("Value", new PropertyTester() {
129 protected Object
getNewValue(String p
, Object old
) {
130 return utils
.isVoid(old
) ?
new Double(234.89) :
131 super.getNewValue(p
, old
) ;