merge the formfield patch from ooo-build
[ooovba.git] / qadevOOo / tests / java / ifc / awt / _UnoControlCurrencyFieldModel.java
blob7887874438bc7c7c7f34d61fa4268008f0e6a39b
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: _UnoControlCurrencyFieldModel.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.UnoControlCurrencyFieldModel</code>
38 * service properties :
39 * <ul>
40 * <li><code> BackgroundColor</code></li>
41 * <li><code> Border</code></li>
42 * <li><code> CurrencySymbol</code></li>
43 * <li><code> DecimalAccuracy</code></li>
44 * <li><code> DefaultControl</code></li>
45 * <li><code> Enabled</code></li>
46 * <li><code> FontDescriptor</code></li>
47 * <li><code> ShowThousandsSeparator</code></li>
48 * <li><code> Printable</code></li>
49 * <li><code> ReadOnly</code></li>
50 * <li><code> Spin</code></li>
51 * <li><code> StrictFormat</code></li>
52 * <li><code> Tabstop</code></li>
53 * <li><code> TextColor</code></li>
54 * <li><code> Value</code></li>
55 * <li><code> ValueMax</code></li>
56 * <li><code> ValueMin</code></li>
57 * <li><code> ValueStep</code></li>
58 * </ul>
59 * @see com.sun.star.awt.UnoControlCurrencyFieldModel
61 public class _UnoControlCurrencyFieldModel extends MultiPropertyTest {
63 /**
64 * This property can be void, so if old value is <code> null </code>
65 * new value must be specified.
67 public void _BackgroundColor() {
68 testProperty("BackgroundColor", new PropertyTester() {
69 protected Object getNewValue(String prop, Object old) {
70 return utils.isVoid(old) ? new Integer(6543) : null ;
72 }) ;
75 /**
76 * This property can be void, so if old value is <code> null </code>
77 * new value must be specified.
79 public void _Tabstop() {
80 testProperty("Tabstop", new PropertyTester() {
81 protected Object getNewValue(String prop, Object old) {
82 return utils.isVoid(old) ? new Boolean(true) : null ;
84 }) ;
87 /**
88 * This property can be VOID, and in case if it is so new
89 * value must defined.
91 public void _BorderColor() {
92 testProperty("BorderColor", new PropertyTester() {
93 protected Object getNewValue(String p, Object old) {
94 return utils.isVoid(old) ? new Integer(1234) : null ;
96 }) ;
99 /**
100 * This property can be void, so if old value is <code> null </code>
101 * new value must be specified.
103 public void _TextColor() {
104 testProperty("TextColor", new PropertyTester() {
105 protected Object getNewValue(String prop, Object old) {
106 return utils.isVoid(old) ? new Integer(123) : null ;
108 }) ;
112 * This property can be void, so if old value is <code> null </code>
113 * new value must be specified.
115 public void _TextLineColor() {
116 testProperty("TextLineColor", new PropertyTester() {
117 protected Object getNewValue(String prop, Object old) {
118 return utils.isVoid(old) ? new Integer(123) : null ;
120 }) ;
124 * This property can be void, so if old value is <code> null </code>
125 * new value must be specified.
127 public void _Value() {
128 testProperty("Value", new PropertyTester() {
129 protected Object getNewValue(String prop, Object old) {
130 return utils.isVoid(old) ? new Double(777) :
131 super.getNewValue(prop, old) ;
133 }) ;