source: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/messagehandler/HandlerDestroy.java @ 42

Last change on this file since 42 was 1, checked in by sherbold, 14 years ago
File size: 558 bytes
Line 
1package de.ugoe.cs.eventbench.messagehandler;
2
3import de.ugoe.cs.eventbench.data.WindowTree;
4
5public class HandlerDestroy extends MessageHandler {
6
7        public HandlerDestroy() {
8                super();
9        }
10
11        private int hwnd;
12       
13        @Override
14        public void onEndElement() {
15                if( hwnd!=0 ) {
16                        WindowTree.getInstance().remove(hwnd);
17                }
18        }
19
20        @Override
21        public void onParameter(String name, String value) {
22                if( name.equals("window.hwnd") ) {
23                        hwnd = Integer.parseInt(value);
24                }
25        }
26
27        @Override
28        public void onStartElement() {
29                hwnd = 0;
30        }
31
32}
Note: See TracBrowser for help on using the repository browser.