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  * WindowListener.java
24  *
25  * Created on 30. Juli 2002, 12:36
26  */
27 
28 package helper;
29 
30 /**
31  * An own implementation of a XWindowListener
32  *
33  */
34 public class WindowListener implements com.sun.star.awt.XWindowListener {
35 
36     // hidden called
37     public boolean hiddenTrigger;
38     // move called
39     public boolean movedTrigger;
40     // resize called
41     public boolean resizedTrigger;
42     // show called
43     public boolean shownTrigger;
44     // dispose called
45     public boolean disposeTrigger;
46 
47     /**
48      * Creates a new WindowListener
49      */
WindowListener()50     public WindowListener() {
51         resetTrigger();
52     }
53 
54     /**
55      * The window hidden event
56      */
windowHidden(com.sun.star.lang.EventObject eventObject)57     public void windowHidden(com.sun.star.lang.EventObject eventObject) {
58         hiddenTrigger = true;
59     }
60 
61     /**
62      * The window move event
63      */
windowMoved(com.sun.star.awt.WindowEvent windowEvent)64     public void windowMoved(com.sun.star.awt.WindowEvent windowEvent) {
65         movedTrigger = true;
66     }
67 
68     /**
69      * The window resize event
70      */
windowResized(com.sun.star.awt.WindowEvent windowEvent)71     public void windowResized(com.sun.star.awt.WindowEvent windowEvent) {
72         resizedTrigger = true;
73     }
74 
75     /**
76      * The window show event
77      */
windowShown(com.sun.star.lang.EventObject eventObject)78     public void windowShown(com.sun.star.lang.EventObject eventObject) {
79         shownTrigger = true;
80     }
81 
82     /**
83      * The dispose event
84      */
disposing(com.sun.star.lang.EventObject eventObject)85     public void disposing(com.sun.star.lang.EventObject eventObject) {
86         disposeTrigger = true;
87     }
88 
89     /**
90      * Reset all triggers to "not fired".
91      */
resetTrigger()92     public void resetTrigger() {
93         hiddenTrigger = false;
94         movedTrigger = false;
95         resizedTrigger = false;
96         shownTrigger = false;
97         disposeTrigger = false;
98     }
99 }
100