~ubuntu-branches/ubuntu/precise/jcsp/precise

« back to all changes in this revision

Viewing changes to src/org/jcsp/awt/WindowEventHandler.java

  • Committer: Bazaar Package Importer
  • Author(s): Miguel Landaeta
  • Date: 2010-06-20 18:12:26 UTC
  • Revision ID: james.westby@ubuntu.com-20100620181226-8yg8d9rjjjiuy7oz
Tags: upstream-1.1-rc4
ImportĀ upstreamĀ versionĀ 1.1-rc4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//////////////////////////////////////////////////////////////////////
 
2
//                                                                  //
 
3
//  JCSP ("CSP for Java") Libraries                                 //
 
4
//  Copyright (C) 1996-2008 Peter Welch and Paul Austin.            //
 
5
//                2001-2004 Quickstone Technologies Limited.        //
 
6
//                                                                  //
 
7
//  This library is free software; you can redistribute it and/or   //
 
8
//  modify it under the terms of the GNU Lesser General Public      //
 
9
//  License as published by the Free Software Foundation; either    //
 
10
//  version 2.1 of the License, or (at your option) any later       //
 
11
//  version.                                                        //
 
12
//                                                                  //
 
13
//  This library is distributed in the hope that it will be         //
 
14
//  useful, but WITHOUT ANY WARRANTY; without even the implied      //
 
15
//  warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR         //
 
16
//  PURPOSE. See the GNU Lesser General Public License for more     //
 
17
//  details.                                                        //
 
18
//                                                                  //
 
19
//  You should have received a copy of the GNU Lesser General       //
 
20
//  Public License along with this library; if not, write to the    //
 
21
//  Free Software Foundation, Inc., 59 Temple Place, Suite 330,     //
 
22
//  Boston, MA 02111-1307, USA.                                     //
 
23
//                                                                  //
 
24
//  Author contact: P.H.Welch@kent.ac.uk                             //
 
25
//                                                                  //
 
26
//                                                                  //
 
27
//////////////////////////////////////////////////////////////////////
 
28
 
 
29
package org.jcsp.awt;
 
30
 
 
31
import org.jcsp.lang.*;
 
32
import java.awt.event.*;
 
33
 
 
34
/**
 
35
 * @author P.D. Austin and P.H. Welch
 
36
 */
 
37
class WindowEventHandler implements WindowListener
 
38
{
 
39
   /**
 
40
    * The Channel action event notifications are sent down.
 
41
    */
 
42
   protected ChannelOutput event;
 
43
   
 
44
   /**
 
45
    * constructs a new WindowEventHandler with the specified output Channel.
 
46
    *
 
47
    * @param event The Channel to send the event notification down
 
48
    */
 
49
   public WindowEventHandler(ChannelOutput event)
 
50
   {
 
51
      this.event  = event;
 
52
   }
 
53
   
 
54
   /**
 
55
    * Invoked when the Component the event handler is listening to has the window
 
56
    * opened. Notifies the event process that a WindowEvent has
 
57
    * occurred by sending the WindowEvent Object. Some notifications will be
 
58
    * lost so there are no guarantees that all events generated will be
 
59
    * processed.
 
60
    *
 
61
    * @param e The parameters associated with this event
 
62
    */
 
63
   public void windowOpened(WindowEvent e)
 
64
   {
 
65
      event.write(e);
 
66
   }
 
67
   
 
68
   /**
 
69
    * Invoked when the Component the event handler is listening to has the window
 
70
    * start to close. Notifies the event process that a WindowEvent has
 
71
    * occurred by sending the WindowEvent Object. Some notifications will be
 
72
    * lost so there are no guarantees that all events generated will be
 
73
    * processed.
 
74
    *
 
75
    * @param e The parameters associated with this event
 
76
    */
 
77
   public void windowClosing(WindowEvent e)
 
78
   {
 
79
      event.write(e);
 
80
   }
 
81
   
 
82
   /**
 
83
    * Invoked when the Component the event handler is listening to has the window
 
84
    * closed. Notifies the event process that a WindowEvent has
 
85
    * occurred by sending the WindowEvent Object. Some notifications will be
 
86
    * lost so there are no guarantees that all events generated will be
 
87
    * processed.
 
88
    *
 
89
    * @param e The parameters associated with this event
 
90
    */
 
91
   public void windowClosed(WindowEvent e)
 
92
   {
 
93
      event.write(e);
 
94
   }
 
95
   
 
96
   /**
 
97
    * Invoked when the Component the event handler is listening to has the window
 
98
    * iconified. Notifies the event process that a WindowEvent has
 
99
    * occurred by sending the WindowEvent Object. Some notifications will be
 
100
    * lost so there are no guarantees that all events generated will be
 
101
    * processed.
 
102
    *
 
103
    * @param e The parameters associated with this event
 
104
    */
 
105
   public void windowIconified(WindowEvent e)
 
106
   {
 
107
      event.write(e);
 
108
   }
 
109
   
 
110
   /**
 
111
    * Invoked when the Component the event handler is listening to has the window
 
112
    * deiconified. Notifies the event process that a WindowEvent has
 
113
    * occurred by sending the WindowEvent Object. Some notifications will be
 
114
    * lost so there are no guarantees that all events generated will be
 
115
    * processed.
 
116
    *
 
117
    * @param e The parameters associated with this event
 
118
    */
 
119
   public void windowDeiconified(WindowEvent e)
 
120
   {
 
121
      event.write(e);
 
122
   }
 
123
   
 
124
   /**
 
125
    * Invoked when the Component the event handler is listening to has the window
 
126
    * activated. Notifies the event process that a WindowEvent has
 
127
    * occurred by sending the WindowEvent Object. Some notifications will be
 
128
    * lost so there are no guarantees that all events generated will be
 
129
    * processed.
 
130
    *
 
131
    * @param e The parameters associated with this event
 
132
    */
 
133
   public void windowActivated(WindowEvent e)
 
134
   {
 
135
      event.write(e);
 
136
   }
 
137
   
 
138
   /**
 
139
    * Invoked when the Component the event handler is listening to has the window
 
140
    * deactivated. Notifies the event process that a WindowEvent has
 
141
    * occurred by sending the WindowEvent Object. Some notifications will be
 
142
    * lost so there are no guarantees that all events generated will be
 
143
    * processed.
 
144
    *
 
145
    * @param e The parameters associated with this event
 
146
    */
 
147
   public void windowDeactivated(WindowEvent e)
 
148
   {
 
149
      event.write(e);
 
150
   }
 
151
}
 
 
b'\\ No newline at end of file'