|
1 /* |
|
2 * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. |
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
|
4 * |
|
5 * This code is free software; you can redistribute it and/or modify it |
|
6 * under the terms of the GNU General Public License version 2 only, as |
|
7 * published by the Free Software Foundation. |
|
8 * |
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
|
13 * accompanied this code). |
|
14 * |
|
15 * You should have received a copy of the GNU General Public License version |
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 * |
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
20 * or visit www.oracle.com if you need additional information or have any |
|
21 * questions. |
|
22 */ |
|
23 package org.netbeans.jemmy.drivers; |
|
24 |
|
25 import org.netbeans.jemmy.operators.ComponentOperator; |
|
26 |
|
27 /** |
|
28 * Defines how to work with windows. |
|
29 */ |
|
30 public interface WindowDriver { |
|
31 |
|
32 /** |
|
33 * Activates a window. |
|
34 * |
|
35 * @param oper Window operator. |
|
36 */ |
|
37 public void activate(ComponentOperator oper); |
|
38 |
|
39 /** |
|
40 * Requests a window to close. |
|
41 * |
|
42 * @param oper Window operator. |
|
43 */ |
|
44 public void requestClose(ComponentOperator oper); |
|
45 |
|
46 /** |
|
47 * Closes a window by requesting it to close and then hiding it. |
|
48 * |
|
49 * @param oper Window operator. |
|
50 */ |
|
51 public void requestCloseAndThenHide(ComponentOperator oper); |
|
52 |
|
53 /** |
|
54 * Closes a window by requesting it to close and then hiding it. |
|
55 * |
|
56 * @param oper Window operator. |
|
57 * @deprecated Use requestClose(ComponentOperator) instead. |
|
58 */ |
|
59 @Deprecated |
|
60 public void close(ComponentOperator oper); |
|
61 |
|
62 /** |
|
63 * Change window location. |
|
64 * |
|
65 * @param oper Window operator. |
|
66 * @param x New x coordinate |
|
67 * @param y New y coordinate |
|
68 */ |
|
69 public void move(ComponentOperator oper, int x, int y); |
|
70 |
|
71 /** |
|
72 * Change window size. |
|
73 * |
|
74 * @param oper Window operator. |
|
75 * @param width New window width. |
|
76 * @param height New window height. |
|
77 */ |
|
78 public void resize(ComponentOperator oper, int width, int height); |
|
79 } |