1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir package ifc.awt;
29*cdf0e10cSrcweir 
30*cdf0e10cSrcweir import lib.MultiMethodTest;
31*cdf0e10cSrcweir import lib.Status;
32*cdf0e10cSrcweir 
33*cdf0e10cSrcweir import com.sun.star.awt.XControl;
34*cdf0e10cSrcweir import com.sun.star.awt.XControlContainer;
35*cdf0e10cSrcweir import com.sun.star.awt.XTabController;
36*cdf0e10cSrcweir import com.sun.star.awt.XTabControllerModel;
37*cdf0e10cSrcweir 
38*cdf0e10cSrcweir /**
39*cdf0e10cSrcweir * This interface is DEPRECATED !!!
40*cdf0e10cSrcweir * All test results are SKIPPED.OK now.
41*cdf0e10cSrcweir * Testing <code>com.sun.star.awt.XTabController</code>
42*cdf0e10cSrcweir * interface methods :
43*cdf0e10cSrcweir * <ul>
44*cdf0e10cSrcweir *  <li><code> activateFirst()</code></li>
45*cdf0e10cSrcweir *  <li><code> activateLast()</code></li>
46*cdf0e10cSrcweir *  <li><code> activateTabOrder()</code></li>
47*cdf0e10cSrcweir *  <li><code> autoTabOrder()</code></li>
48*cdf0e10cSrcweir *  <li><code> getContainer()</code></li>
49*cdf0e10cSrcweir *  <li><code> getCotrols()</code></li>
50*cdf0e10cSrcweir *  <li><code> getModel()</code></li>
51*cdf0e10cSrcweir *  <li><code> setContainer()</code></li>
52*cdf0e10cSrcweir *  <li><code> setModel()</code></li>
53*cdf0e10cSrcweir * </ul><p>
54*cdf0e10cSrcweir * This test needs the following object relations :
55*cdf0e10cSrcweir * <ul>
56*cdf0e10cSrcweir *  <li> <code>'MODEL'</code> : <code>XTabControllerModel</code> a model for
57*cdf0e10cSrcweir *   the object</li>
58*cdf0e10cSrcweir *  <li> <code>'CONTAINER'</code> : <code>XControlContainer</code> a container
59*cdf0e10cSrcweir *   for the object</li>
60*cdf0e10cSrcweir * <ul> <p>
61*cdf0e10cSrcweir * @see com.sun.star.awt.XTabController
62*cdf0e10cSrcweir */
63*cdf0e10cSrcweir public class _XTabController extends MultiMethodTest {
64*cdf0e10cSrcweir     public XTabController oObj = null;
65*cdf0e10cSrcweir 
66*cdf0e10cSrcweir     /**
67*cdf0e10cSrcweir     * Test calls the method with object relation 'MODEL' as a parameter.<p>
68*cdf0e10cSrcweir     * Has <b> OK </b> status if the method successfully returns
69*cdf0e10cSrcweir     * and no exceptions were thrown. <p>
70*cdf0e10cSrcweir     */
71*cdf0e10cSrcweir     public void _setModel() {
72*cdf0e10cSrcweir         oObj.setModel( (XTabControllerModel) tEnv.getObjRelation("MODEL"));
73*cdf0e10cSrcweir         tRes.tested("setModel()", Status.skipped(true) );
74*cdf0e10cSrcweir     }
75*cdf0e10cSrcweir 
76*cdf0e10cSrcweir     /**
77*cdf0e10cSrcweir     * Test calls the method, then checks returned value.<p>
78*cdf0e10cSrcweir     * Has <b> OK </b> status if method returns a value that equals to
79*cdf0e10cSrcweir     * corresponding object relation.<p>
80*cdf0e10cSrcweir     * The following method tests are to be completed successfully before :
81*cdf0e10cSrcweir     * <ul>
82*cdf0e10cSrcweir     *  <li> <code> setModel() </code> : sets model for the object </li>
83*cdf0e10cSrcweir     * </ul>
84*cdf0e10cSrcweir     */
85*cdf0e10cSrcweir     public void _getModel() {
86*cdf0e10cSrcweir         requiredMethod("setModel()");
87*cdf0e10cSrcweir         XTabControllerModel setModel = oObj.getModel();
88*cdf0e10cSrcweir         tRes.tested("getModel()", Status.skipped(true));
89*cdf0e10cSrcweir     }
90*cdf0e10cSrcweir 
91*cdf0e10cSrcweir     /**
92*cdf0e10cSrcweir     * Test calls the method with object relation 'CONTAINER' as a parameter.<p>
93*cdf0e10cSrcweir     * Has <b> OK </b> status if the method successfully returns
94*cdf0e10cSrcweir     * and no exceptions were thrown. <p>
95*cdf0e10cSrcweir     */
96*cdf0e10cSrcweir     public void _setContainer() {
97*cdf0e10cSrcweir         oObj.setContainer( (XControlContainer)
98*cdf0e10cSrcweir             tEnv.getObjRelation("CONTAINER"));
99*cdf0e10cSrcweir         tRes.tested("setContainer()", Status.skipped(true));
100*cdf0e10cSrcweir     }
101*cdf0e10cSrcweir 
102*cdf0e10cSrcweir     /**
103*cdf0e10cSrcweir     * Test calls the method, then checks returned value.<p>
104*cdf0e10cSrcweir     * Has <b> OK </b> status if method returns a value that equals to
105*cdf0e10cSrcweir     * corresponding object relation.<p>
106*cdf0e10cSrcweir     * The following method tests are to be completed successfully before :
107*cdf0e10cSrcweir     * <ul>
108*cdf0e10cSrcweir     *  <li> <code> setContainer() </code> : sets container for the object</li>
109*cdf0e10cSrcweir     * </ul>
110*cdf0e10cSrcweir     */
111*cdf0e10cSrcweir     public void _getContainer() {
112*cdf0e10cSrcweir         requiredMethod( "setContainer()");
113*cdf0e10cSrcweir         XControlContainer setContainer = oObj.getContainer();
114*cdf0e10cSrcweir         XControlContainer relContainer = (XControlContainer )
115*cdf0e10cSrcweir                                             tEnv.getObjRelation("CONTAINER");
116*cdf0e10cSrcweir         tRes.tested("getContainer()", Status.skipped(true) );
117*cdf0e10cSrcweir     }
118*cdf0e10cSrcweir 
119*cdf0e10cSrcweir     /**
120*cdf0e10cSrcweir     * Test calls the method, then checks returned sequence.<p>
121*cdf0e10cSrcweir     * Has <b> OK </b> status if returned sequence is not null.<p>
122*cdf0e10cSrcweir     */
123*cdf0e10cSrcweir     public void _getControls() {
124*cdf0e10cSrcweir         XControl[] aControl = oObj.getControls();
125*cdf0e10cSrcweir         tRes.tested("getControls()", Status.skipped(true) );
126*cdf0e10cSrcweir     }
127*cdf0e10cSrcweir 
128*cdf0e10cSrcweir     /**
129*cdf0e10cSrcweir     * Test calls the method. <p>
130*cdf0e10cSrcweir     * Has <b> OK </b> status if the method successfully returns
131*cdf0e10cSrcweir     * and no exceptions were thrown. <p>
132*cdf0e10cSrcweir     */
133*cdf0e10cSrcweir     public void _autoTabOrder() {
134*cdf0e10cSrcweir         oObj.autoTabOrder();
135*cdf0e10cSrcweir         tRes.tested("autoTabOrder()", Status.skipped(true));
136*cdf0e10cSrcweir     }
137*cdf0e10cSrcweir 
138*cdf0e10cSrcweir     /**
139*cdf0e10cSrcweir     * Test calls the method. <p>
140*cdf0e10cSrcweir     * Has <b> OK </b> status if the method successfully returns
141*cdf0e10cSrcweir     * and no exceptions were thrown. <p>
142*cdf0e10cSrcweir     */
143*cdf0e10cSrcweir     public void _activateTabOrder() {
144*cdf0e10cSrcweir         oObj.activateTabOrder();
145*cdf0e10cSrcweir         tRes.tested("activateTabOrder()", Status.skipped(true));
146*cdf0e10cSrcweir     }
147*cdf0e10cSrcweir 
148*cdf0e10cSrcweir     /**
149*cdf0e10cSrcweir     * Test calls the method. <p>
150*cdf0e10cSrcweir     * Has <b> OK </b> status if the method successfully returns
151*cdf0e10cSrcweir     * and no exceptions were thrown. <p>
152*cdf0e10cSrcweir     */
153*cdf0e10cSrcweir     public void _activateFirst() {
154*cdf0e10cSrcweir         oObj.activateFirst();
155*cdf0e10cSrcweir         tRes.tested("activateFirst()", Status.skipped(true));
156*cdf0e10cSrcweir     }
157*cdf0e10cSrcweir 
158*cdf0e10cSrcweir     /**
159*cdf0e10cSrcweir     * Test calls the method. <p>
160*cdf0e10cSrcweir     * Has <b> OK </b> status if the method successfully returns
161*cdf0e10cSrcweir     * and no exceptions were thrown. <p>
162*cdf0e10cSrcweir     */
163*cdf0e10cSrcweir     public void _activateLast() {
164*cdf0e10cSrcweir         oObj.activateLast();
165*cdf0e10cSrcweir         tRes.tested("activateLast()", Status.skipped(true));
166*cdf0e10cSrcweir     }
167*cdf0e10cSrcweir }
168*cdf0e10cSrcweir 
169