1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 package mod._forms; 24 import com.sun.star.beans.NamedValue; 25 import java.io.PrintWriter; 26 27 import lib.TestEnvironment; 28 import lib.TestParameters; 29 30 31 /** 32 * Test for object which is represented by service 33 * <code>com.sun.star.form.component.CurrencyField</code>. <p> 34 * Object implements the following interfaces : 35 * <ul> 36 * <li> <code>com::sun::star::io::XPersistObject</code></li> 37 * <li> <code>com::sun::star::form::XReset</code></li> 38 * <li> <code>com::sun::star::form::XBoundComponent</code></li> 39 * <li> <code>com::sun::star::form::FormComponent</code></li> 40 * <li> <code>com::sun::star::beans::XFastPropertySet</code></li> 41 * <li> <code>com::sun::star::beans::XMultiPropertySet</code></li> 42 * <li> <code>com::sun::star::form::XUpdateBroadcaster</code></li> 43 * <li> <code>com::sun::star::form::DataAwareControlModel</code></li> 44 * <li> <code>com::sun::star::awt::UnoControlCurrencyFieldModel</code></li> 45 * <li> <code>com::sun::star::beans::XPropertyState</code></li> 46 * <li> <code>com::sun::star::form::FormControlModel</code></li> 47 * <li> <code>com::sun::star::container::XNamed</code></li> 48 * <li> <code>com::sun::star::lang::XComponent</code></li> 49 * <li> <code>com::sun::star::lang::XEventListener</code></li> 50 * <li> <code>com::sun::star::beans::XPropertyAccess</code></li> 51 * <li> <code>com::sun::star::beans::XPropertyContainer</code></li> 52 * <li> <code>com::sun::star::beans::XPropertySet</code></li> 53 * <li> <code>com::sun::star::form::XLoadListener</code></li> 54 * <li> <code>com::sun::star::container::XChild</code></li> 55 * <li> <code>com::sun::star::form::component::CurrencyField</code></li> 56 * </ul> 57 * This object test <b> is NOT </b> designed to be run in several 58 * threads concurently. 59 * @see com.sun.star.io.XPersistObject 60 * @see com.sun.star.form.XReset 61 * @see com.sun.star.form.XBoundComponent 62 * @see com.sun.star.form.FormComponent 63 * @see com.sun.star.beans.XFastPropertySet 64 * @see com.sun.star.beans.XMultiPropertySet 65 * @see com.sun.star.form.XUpdateBroadcaster 66 * @see com.sun.star.form.DataAwareControlModel 67 * @see com.sun.star.awt.UnoControlCurrencyFieldModel 68 * @see com.sun.star.beans.XPropertyState 69 * @see com.sun.star.form 70 * @see com.sun.star.container.XNamed 71 * @see com.sun.star.lang.XComponent 72 * @see com.sun.star.lang.XEventListener 73 * @see com.sun.star.beans.XPropertyAccess 74 * @see com.sun.star.beans.XPropertyContainer 75 * @see com.sun.star.beans.XPropertySet 76 * @see com.sun.star.form.XLoadListener 77 * @see com.sun.star.container.XChild 78 * @see com.sun.star.form.component.CurrencyField 79 * @see ifc.io._XPersistObject 80 * @see ifc.form._XReset 81 * @see ifc.form._XBoundComponent 82 * @see ifc.form._FormComponent 83 * @see ifc.beans._XFastPropertySet 84 * @see ifc.beans._XMultiPropertySet 85 * @see ifc.form._XUpdateBroadcaster 86 * @see ifc.form._DataAwareControlModel 87 * @see ifc.awt._UnoControlCurrencyFieldModel 88 * @see ifc.beans._XPropertyState 89 * @see ifc.form._FormControlModel 90 * @see ifc.container._XNamed 91 * @see ifc.lang._XComponent 92 * @see ifc.lang._XEventListener 93 * @see ifc.beans._XPropertySet 94 * @see ifc.form._XLoadListener 95 * @see ifc.container._XChild 96 * @see ifc.form.component._CurrencyField 97 */ 98 public class OCurrencyModel extends GenericModelTest { 99 100 /** 101 * Set some member variable of the super class <CODE>GenericModelTest</CODE>: 102 * <pre> 103 * super.m_ChangePropertyName = "Value"; 104 * super.m_kindOfControl="CurrencyField"; 105 * super.m_ObjectName = "stardiv.one.form.component.CurrencyField"; 106 * NamedValue myProp = new NamedValue(); 107 * myProp.Name = "DataField"; 108 * myProp.Value = "Identifier"; 109 * super.m_propertiesToSet.add(myProp); 110 * super.m_LCShape_Type = "FixedText"; 111 * </pre> 112 * Then <CODE>super.initialize()</CODE> was called. 113 * @param tParam the test parameter 114 * @param log the log writer 115 */ initialize(TestParameters tParam, PrintWriter log)116 protected void initialize(TestParameters tParam, PrintWriter log) { 117 118 super.initialize(tParam, log); 119 120 super.m_ObjectName = "stardiv.one.form.component.CurrencyField"; 121 122 super.m_kindOfControl="CurrencyField"; 123 124 NamedValue myProp = new NamedValue(); 125 myProp.Name = "DataField"; 126 myProp.Value = "Identifier"; 127 super.m_propertiesToSet.add(myProp); 128 129 super.m_ChangePropertyName = "Value"; 130 super.m_ChangePropertyValue = new Double(0); 131 132 super.m_LCShape_Type = "FixedText"; 133 134 } 135 /** 136 * calls <CODE>cleanup()</CODE> from it's super class 137 * @param tParam the test parameter 138 * @param log the log writer 139 */ cleanup(TestParameters tParam, PrintWriter log)140 protected void cleanup(TestParameters tParam, PrintWriter log) { 141 super.cleanup(tParam, log); 142 } 143 144 145 /** 146 * calls <CODE>createTestEnvironment()</CODE> from it's super class 147 * @param Param the test parameter 148 * @param log the log writer 149 * @return lib.TestEnvironment 150 */ createTestEnvironment(TestParameters Param, PrintWriter log)151 protected synchronized TestEnvironment createTestEnvironment(TestParameters Param, 152 PrintWriter log) { 153 return super.createTestEnvironment(Param, log); 154 } 155 } // finish class OCurrencyModel 156