Last change
on this file since 384 was
171,
checked in by sherbold, 13 years ago
|
- code documentation and formatting
|
File size:
1.2 KB
|
Line | |
---|
1 | package de.ugoe.cs.eventbench.windows;
|
---|
2 |
|
---|
3 | import de.ugoe.cs.eventbench.windows.data.WindowTree;
|
---|
4 |
|
---|
5 | /**
|
---|
6 | * <p>
|
---|
7 | * Handler for {@code WM_DESTROY} message. The handler maintains the
|
---|
8 | * {@link WindowTree}.
|
---|
9 | * </p>
|
---|
10 | *
|
---|
11 | * @author Steffen Herbold
|
---|
12 | * @version 1.0
|
---|
13 | */
|
---|
14 | public class HandlerDestroy extends MessageHandler {
|
---|
15 |
|
---|
16 | /**
|
---|
17 | * <p>
|
---|
18 | * Constructor. Creates a new HandlerDestroy.
|
---|
19 | * </p>
|
---|
20 | */
|
---|
21 | public HandlerDestroy() {
|
---|
22 | super();
|
---|
23 | }
|
---|
24 |
|
---|
25 | /**
|
---|
26 | * <p>
|
---|
27 | * HWND of the window that is destroyed.
|
---|
28 | * </p>
|
---|
29 | */
|
---|
30 | private int hwnd;
|
---|
31 |
|
---|
32 | /*
|
---|
33 | * (non-Javadoc)
|
---|
34 | *
|
---|
35 | * @see de.ugoe.cs.eventbench.windows.MessageHandler#onEndElement()
|
---|
36 | */
|
---|
37 | @Override
|
---|
38 | public void onEndElement() {
|
---|
39 | if (hwnd != 0) {
|
---|
40 | WindowTree.getInstance().remove(hwnd);
|
---|
41 | }
|
---|
42 | }
|
---|
43 |
|
---|
44 | /*
|
---|
45 | * (non-Javadoc)
|
---|
46 | *
|
---|
47 | * @see
|
---|
48 | * de.ugoe.cs.eventbench.windows.MessageHandler#onParameter(java.lang.String
|
---|
49 | * , java.lang.String)
|
---|
50 | */
|
---|
51 | @Override
|
---|
52 | public void onParameter(String name, String value) {
|
---|
53 | if (name.equals("window.hwnd")) {
|
---|
54 | hwnd = Integer.parseInt(value);
|
---|
55 | }
|
---|
56 | }
|
---|
57 |
|
---|
58 | /*
|
---|
59 | * (non-Javadoc)
|
---|
60 | *
|
---|
61 | * @see de.ugoe.cs.eventbench.windows.MessageHandler#onStartElement()
|
---|
62 | */
|
---|
63 | @Override
|
---|
64 | public void onStartElement() {
|
---|
65 | hwnd = 0;
|
---|
66 | }
|
---|
67 |
|
---|
68 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.