2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file incorporates work covered by the following license notice:
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 import com
.sun
.star
.beans
.NamedValue
;
21 import java
.io
.PrintWriter
;
23 import lib
.TestEnvironment
;
24 import lib
.TestParameters
;
30 * Test for object which is represented by service
31 * <code>com.sun.star.for.component.NumericField</code>. <p>
32 * Object implements the following interfaces :
34 * <li> <code>com::sun::star::io::XPersistObject</code></li>
35 * <li> <code>com::sun::star::form::XReset</code></li>
36 * <li> <code>com::sun::star::form::XBoundComponent</code></li>
37 * <li> <code>com::sun::star::form::FormComponent</code></li>
38 * <li> <code>com::sun::star::beans::XFastPropertySet</code></li>
39 * <li> <code>com::sun::star::beans::XMultiPropertySet</code></li>
40 * <li> <code>com::sun::star::form::XUpdateBroadcaster</code></li>
41 * <li> <code>com::sun::star::form::DataAwareControlModel</code></li>
42 * <li> <code>com::sun::star::beans::XPropertyState</code></li>
43 * <li> <code>com::sun::star::form::component::NumericField</code></li>
44 * <li> <code>com::sun::star::form::FormControlModel</code></li>
45 * <li> <code>com::sun::star::container::XNamed</code></li>
46 * <li> <code>com::sun::star::lang::XComponent</code></li>
47 * <li> <code>com::sun::star::lang::XEventListener</code></li>
48 * <li> <code>com::sun::star::beans::XPropertyAccess</code></li>
49 * <li> <code>com::sun::star::beans::XPropertyContainer</code></li>
50 * <li> <code>com::sun::star::beans::XPropertySet</code></li>
51 * <li> <code>com::sun::star::awt::UnoControlNumericFieldModel</code></li>
52 * <li> <code>com::sun::star::form::XLoadListener</code></li>
53 * <li> <code>com::sun::star::container::XChild</code></li>
55 * This object test <b> is NOT </b> designed to be run in several
56 * threads concurently.
57 * @see com.sun.star.io.XPersistObject
58 * @see com.sun.star.form.XReset
59 * @see com.sun.star.form.XBoundComponent
60 * @see com.sun.star.form.FormComponent
61 * @see com.sun.star.beans.XFastPropertySet
62 * @see com.sun.star.beans.XMultiPropertySet
63 * @see com.sun.star.form.XUpdateBroadcaster
64 * @see com.sun.star.form.DataAwareControlModel
65 * @see com.sun.star.beans.XPropertyState
66 * @see com.sun.star.form.component.NumericField
67 * @see com.sun.star.form
68 * @see com.sun.star.container.XNamed
69 * @see com.sun.star.lang.XComponent
70 * @see com.sun.star.lang.XEventListener
71 * @see com.sun.star.beans.XPropertyAccess
72 * @see com.sun.star.beans.XPropertyContainer
73 * @see com.sun.star.beans.XPropertySet
74 * @see com.sun.star.awt.UnoControlNumericFieldModel
75 * @see com.sun.star.form.XLoadListener
76 * @see com.sun.star.container.XChild
77 * @see ifc.io._XPersistObject
78 * @see ifc.form._XReset
79 * @see ifc.form._XBoundComponent
80 * @see ifc.form._FormComponent
81 * @see ifc.beans._XFastPropertySet
82 * @see ifc.beans._XMultiPropertySet
83 * @see ifc.form._XUpdateBroadcaster
84 * @see ifc.form._DataAwareControlModel
85 * @see ifc.beans._XPropertyState
86 * @see ifc.form.component._NumericField
87 * @see ifc.form._FormControlModel
88 * @see ifc.container._XNamed
89 * @see ifc.lang._XComponent
90 * @see ifc.lang._XEventListener
91 * @see ifc.beans._XPropertySet
92 * @see ifc.awt._UnoControlNumericFieldModel
93 * @see ifc.form._XLoadListener
94 * @see ifc.container._XChild
96 public class ONumericModel
extends GenericModelTest
{
98 * Set some member variable of the super class <CODE>GenericModelTest</CODE>:
100 * super.m_ChangePropertyName = "Time";
101 * super.m_kindOfControl="TimeField";
102 * super.m_ObjectName = "stardiv.one.form.component.TimeField";
103 * NamedValue DataField = new NamedValue();
104 * DataField.Name = "DataField";
105 * DataField.Value = DBTools.TST_INT_F;
106 * super.m_propertiesToSet.add(DataField);
108 * super.m_LCShape_Type = "FixedText";
110 * Then <CODE>super.initialize()</CODE> was called.
111 * @param tParam the test parameter
112 * @param log the log writer
115 protected void initialize(TestParameters tParam
, PrintWriter log
) {
117 super.initialize(tParam
, log
);
119 super.m_ChangePropertyName
= "Value";
121 super.m_kindOfControl
="NumericField";
123 super.m_ObjectName
= "stardiv.one.form.component.NumericField";
125 NamedValue DataField
= new NamedValue();
126 DataField
.Name
= "DataField";
127 DataField
.Value
= DBTools
.TST_DOUBLE_F
;
128 super.m_propertiesToSet
.add(DataField
);
130 super.m_LCShape_Type
= "FixedText";
135 * calls <CODE>createTestEnvironment()</CODE> from it's super class
136 * @param Param the test parameter
137 * @param log the log writer
138 * @return lib.TestEnvironment
141 protected synchronized TestEnvironment
createTestEnvironment(TestParameters Param
,
143 return super.createTestEnvironment(Param
, log
);
145 } // finish class ONumericModel