1*b4d2d410SLiu Zhe /************************************************************** 2*b4d2d410SLiu Zhe * 3*b4d2d410SLiu Zhe * Licensed to the Apache Software Foundation (ASF) under one 4*b4d2d410SLiu Zhe * or more contributor license agreements. See the NOTICE file 5*b4d2d410SLiu Zhe * distributed with this work for additional information 6*b4d2d410SLiu Zhe * regarding copyright ownership. The ASF licenses this file 7*b4d2d410SLiu Zhe * to you under the Apache License, Version 2.0 (the 8*b4d2d410SLiu Zhe * "License"); you may not use this file except in compliance 9*b4d2d410SLiu Zhe * with the License. You may obtain a copy of the License at 10*b4d2d410SLiu Zhe * 11*b4d2d410SLiu Zhe * http://www.apache.org/licenses/LICENSE-2.0 12*b4d2d410SLiu Zhe * 13*b4d2d410SLiu Zhe * Unless required by applicable law or agreed to in writing, 14*b4d2d410SLiu Zhe * software distributed under the License is distributed on an 15*b4d2d410SLiu Zhe * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*b4d2d410SLiu Zhe * KIND, either express or implied. See the License for the 17*b4d2d410SLiu Zhe * specific language governing permissions and limitations 18*b4d2d410SLiu Zhe * under the License. 19*b4d2d410SLiu Zhe * 20*b4d2d410SLiu Zhe *************************************************************/ 21*b4d2d410SLiu Zhe 22*b4d2d410SLiu Zhe package testlib.gui; 23*b4d2d410SLiu Zhe 24*b4d2d410SLiu Zhe import static testlib.gui.UIMap.*; 25*b4d2d410SLiu Zhe 26*b4d2d410SLiu Zhe import org.openoffice.test.vcl.widgets.VclWindow; 27*b4d2d410SLiu Zhe 28*b4d2d410SLiu Zhe public class SDTool { 29*b4d2d410SLiu Zhe getActiveView()30*b4d2d410SLiu Zhe public static VclWindow getActiveView() { 31*b4d2d410SLiu Zhe VclWindow[] views = new VclWindow[] { impress, impressOutline, impressSlideSorter, impressHandout }; 32*b4d2d410SLiu Zhe for (VclWindow w : views) { 33*b4d2d410SLiu Zhe if (w.exists()) { 34*b4d2d410SLiu Zhe return w; 35*b4d2d410SLiu Zhe } 36*b4d2d410SLiu Zhe } 37*b4d2d410SLiu Zhe 38*b4d2d410SLiu Zhe return null; 39*b4d2d410SLiu Zhe } 40*b4d2d410SLiu Zhe } 41