Branch libreoffice-5-0-4
[LibreOffice.git] / qadevOOo / tests / java / ifc / form / component / _GridControl.java
blobde773f4d26626abd234f3197dfc09a82c8ff8cc0
1 /*
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 .
19 package ifc.form.component;
21 import lib.MultiPropertyTest;
23 /**
24 * Testing <code>com.sun.star.form.component.GridControl</code>
25 * service properties :
26 * <ul>
27 * <li><code> Border</code></li>
28 * <li><code> Enabled</code></li>
29 * <li><code> FontDescriptor</code></li>
30 * <li><code> RowHeight</code></li>
31 * <li><code> Tabstop</code></li>
32 * <li><code> TextColor</code></li>
33 * </ul>
34 * Properties testing is automated by <code>lib.MultiPropertyTest</code>.
35 * @see com.sun.star.form.component.GridControl
37 public class _GridControl extends MultiPropertyTest {
39 /**
40 * This property can be void, so if old value is <code> null </code>
41 * new value must be specified.
43 public void _RowHeight() {
44 testProperty("RowHeight", new PropertyTester() {
45 @Override
46 protected Object getNewValue(String prop, Object old) {
47 return util.utils.isVoid(old) ? Integer.valueOf(11) :
48 super.getNewValue(prop, old) ;
50 }) ;
53 /**
54 * This property can be void, so if old value is <code> null </code>
55 * new value must be specified.
57 public void _Tabstop() {
58 testProperty("Tabstop", new PropertyTester() {
59 @Override
60 protected Object getNewValue(String prop, Object old) {
61 return util.utils.isVoid(old) ? Boolean.TRUE :
62 super.getNewValue(prop, old) ;
64 }) ;
67 /**
68 * This property can be void, so if old value is <code> null </code>
69 * new value must be specified.
71 public void _TextColor() {
72 testProperty("TextColor", new PropertyTester() {
73 @Override
74 protected Object getNewValue(String prop, Object old) {
75 return util.utils.isVoid(old) ? Integer.valueOf(342) :
76 super.getNewValue(prop, old) ;
78 }) ;
81 /**
82 * This property can be void, so if old value is <code> null </code>
83 * new value must be specified.
85 public void _BorderColor() {
86 testProperty("BorderColor", new PropertyTester() {
87 @Override
88 protected Object getNewValue(String prop, Object old) {
89 return util.utils.isVoid(old) ? Integer.valueOf(342) :
90 super.getNewValue(prop, old) ;
92 }) ;
94 } // finish class _GridControl