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 24 package ifc.awt; 25 26 import lib.MultiPropertyTest; 27 import util.utils; 28 29 30 /** 31 * Testing <code>com.sun.star.awt.UnoControlTimeFieldModel</code> 32 * service properties : 33 * <ul> 34 * <li><code> BackgroundColor</code></li> 35 * <li><code> Border</code></li> 36 * <li><code> HelpText</code></li> 37 * <li><code> HelpURL</code></li> 38 * <li><code> FontEmphasisMark</code></li> 39 * <li><code> FontRelief</code></li> 40 * <li><code> Enabled</code></li> 41 * <li><code> TimeFormat</code></li> 42 * <li><code> FontDescriptor</code></li> 43 * <li><code> Printable</code></li> 44 * <li><code> ReadOnly</code></li> 45 * <li><code> Spin</code></li> 46 * <li><code> StrictFormat</code></li> 47 * <li><code> Tabstop</code></li> 48 * <li><code> TextColor</code></li> 49 * <li><code> TextLineColor</code></li> 50 * <li><code> Time</code></li> 51 * <li><code> TimeFormat</code></li> 52 * <li><code> TimeMax</code></li> 53 * <li><code> TimeMin</code></li> 54 * </ul> <p> 55 * Properties testing is automated by <code>lib.MultiPropertyTest</code>. 56 * @see com.sun.star.awt.UnoControlTimeFieldModel 57 */ 58 public class _UnoControlTimeFieldModel extends MultiPropertyTest { 59 60 /** 61 * This property can be VOID, and in case if it is so new 62 * value must defined. 63 */ _BackgroundColor()64 public void _BackgroundColor() { 65 testProperty("BackgroundColor", new PropertyTester() { 66 protected Object getNewValue(String p, Object old) { 67 return utils.isVoid(old) ? new Integer(1234) : null ; 68 } 69 }) ; 70 } 71 72 /** 73 * This property can be VOID, and in case if it is so new 74 * value must defined. 75 */ _BorderColor()76 public void _BorderColor() { 77 testProperty("BorderColor", new PropertyTester() { 78 protected Object getNewValue(String p, Object old) { 79 return utils.isVoid(old) ? new Integer(1234) : null ; 80 } 81 }) ; 82 } 83 84 /** 85 * This property can be VOID, and in case if it is so new 86 * value must defined. 87 */ _TextColor()88 public void _TextColor() { 89 testProperty("TextColor", new PropertyTester() { 90 protected Object getNewValue(String p, Object old) { 91 return utils.isVoid(old) ? new Integer(4321) : null ; 92 } 93 }) ; 94 } 95 96 /** 97 * This property can be VOID, and in case if it is so new 98 * value must defined. 99 */ _TextLineColor()100 public void _TextLineColor() { 101 testProperty("TextLineColor", new PropertyTester() { 102 protected Object getNewValue(String p, Object old) { 103 return utils.isVoid(old) ? new Integer(4321) : null ; 104 } 105 }) ; 106 } 107 108 /** 109 * This property can be VOID, and in case if it is so new 110 * value must defined. 111 */ _Time()112 public void _Time() { 113 testProperty("Time", new PropertyTester() { 114 protected Object getNewValue(String p, Object old) { 115 return utils.isVoid(old) ? new Integer(4321) : 116 super.getNewValue(p, old) ; 117 } 118 }) ; 119 } 120 121 /** 122 * This property can be VOID, and in case if it is so new 123 * value must defined. 124 */ _Tabstop()125 public void _Tabstop() { 126 testProperty("Tabstop", new PropertyTester() { 127 protected Object getNewValue(String p, Object old) { 128 return utils.isVoid(old) ? new Boolean(true) : null ; 129 } 130 }) ; 131 } 132 } 133 134