Changeset 619 for trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/HandlerDestroy.java
- Timestamp:
- 08/27/12 11:45:09 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/HandlerDestroy.java
r581 r619 1 1 2 package de.ugoe.cs.quest.plugin.mfc; 2 3 3 import de.ugoe.cs.quest.plugin.mfc. eventcore.WindowTree;4 import de.ugoe.cs.quest.plugin.mfc.guimodel.WindowTree; 4 5 5 6 /** 6 7 * <p> 7 * Handler for {@code WM_DESTROY} message. The handler maintains the 8 * {@link WindowTree}. 8 * Handler for {@code WM_DESTROY} message. The handler maintains the {@link WindowTree}. 9 9 * </p> 10 10 * … … 14 14 public class HandlerDestroy extends MessageHandler { 15 15 16 /** 17 * <p> 18 * Constructor. Creates a new HandlerDestroy. 19 * </p> 20 */ 21 public HandlerDestroy() { 22 super(); 23 } 16 /** 17 * <p> 18 * Constructor. Creates a new HandlerDestroy. 19 * </p> 20 * 21 * @param windowTree 22 * the tree of GUI element specifications to be created and adapted during parsing 23 */ 24 public HandlerDestroy(WindowTree windowTree) { 25 super(windowTree); 26 } 24 27 25 26 27 28 29 30 private inthwnd;28 /** 29 * <p> 30 * HWND of the window that is destroyed. 31 * </p> 32 */ 33 private long hwnd; 31 34 32 33 34 35 36 37 38 39 40 WindowTree.getInstance().remove(hwnd);41 42 35 /* 36 * (non-Javadoc) 37 * 38 * @see de.ugoe.cs.quest.plugin.mfc.MessageHandler#onEndElement() 39 */ 40 @Override 41 public void onEndElement() { 42 if (hwnd != 0) { 43 super.getWindowTree().remove(hwnd); 44 } 45 } 43 46 44 /* 45 * (non-Javadoc) 46 * 47 * @see 48 * de.ugoe.cs.quest.plugin.mfc.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 } 47 /* 48 * (non-Javadoc) 49 * 50 * @see de.ugoe.cs.quest.plugin.mfc.MessageHandler#onParameter(java.lang.String , 51 * java.lang.String) 52 */ 53 @Override 54 public void onParameter(String name, String value) { 55 if (name.equals("window.hwnd")) { 56 hwnd = Long.parseLong(value); 57 } 58 } 57 59 58 59 60 61 62 63 64 65 66 60 /* 61 * (non-Javadoc) 62 * 63 * @see de.ugoe.cs.quest.plugin.mfc.MessageHandler#onStartElement() 64 */ 65 @Override 66 public void onStartElement() { 67 hwnd = 0; 68 } 67 69 68 70 }
Note: See TracChangeset
for help on using the changeset viewer.