Last change
on this file since 554 was
488,
checked in by sherbold, 12 years ago
|
- converted quest-ui-core to Maven project
|
File size:
1.2 KB
|
Rev | Line | |
---|
[434] | 1 | package de.ugoe.cs.quest.plugin.mfc;
|
---|
[1] | 2 |
|
---|
[434] | 3 | import de.ugoe.cs.quest.plugin.mfc.eventcore.WindowTree;
|
---|
[1] | 4 |
|
---|
[171] | 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 | */
|
---|
[1] | 14 | public class HandlerDestroy extends MessageHandler {
|
---|
| 15 |
|
---|
[171] | 16 | /**
|
---|
| 17 | * <p>
|
---|
| 18 | * Constructor. Creates a new HandlerDestroy.
|
---|
| 19 | * </p>
|
---|
| 20 | */
|
---|
[1] | 21 | public HandlerDestroy() {
|
---|
| 22 | super();
|
---|
| 23 | }
|
---|
| 24 |
|
---|
[171] | 25 | /**
|
---|
| 26 | * <p>
|
---|
| 27 | * HWND of the window that is destroyed.
|
---|
| 28 | * </p>
|
---|
| 29 | */
|
---|
[1] | 30 | private int hwnd;
|
---|
[171] | 31 |
|
---|
| 32 | /*
|
---|
| 33 | * (non-Javadoc)
|
---|
| 34 | *
|
---|
[434] | 35 | * @see de.ugoe.cs.quest.plugin.mfc.MessageHandler#onEndElement()
|
---|
[171] | 36 | */
|
---|
[1] | 37 | @Override
|
---|
| 38 | public void onEndElement() {
|
---|
[171] | 39 | if (hwnd != 0) {
|
---|
[1] | 40 | WindowTree.getInstance().remove(hwnd);
|
---|
| 41 | }
|
---|
| 42 | }
|
---|
| 43 |
|
---|
[171] | 44 | /*
|
---|
| 45 | * (non-Javadoc)
|
---|
| 46 | *
|
---|
| 47 | * @see
|
---|
[434] | 48 | * de.ugoe.cs.quest.plugin.mfc.MessageHandler#onParameter(java.lang.String
|
---|
[171] | 49 | * , java.lang.String)
|
---|
| 50 | */
|
---|
[1] | 51 | @Override
|
---|
| 52 | public void onParameter(String name, String value) {
|
---|
[171] | 53 | if (name.equals("window.hwnd")) {
|
---|
[1] | 54 | hwnd = Integer.parseInt(value);
|
---|
| 55 | }
|
---|
| 56 | }
|
---|
| 57 |
|
---|
[171] | 58 | /*
|
---|
| 59 | * (non-Javadoc)
|
---|
| 60 | *
|
---|
[434] | 61 | * @see de.ugoe.cs.quest.plugin.mfc.MessageHandler#onStartElement()
|
---|
[171] | 62 | */
|
---|
[1] | 63 | @Override
|
---|
| 64 | public void onStartElement() {
|
---|
| 65 | hwnd = 0;
|
---|
| 66 | }
|
---|
| 67 |
|
---|
| 68 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.