Changeset 156 for trunk/EventBenchConsole/src
- Timestamp:
- 08/14/11 19:30:39 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/HandlerCreate.java
r145 r156 1 1 package de.ugoe.cs.eventbench.windows; 2 2 3 import java.util.ArrayList;4 import java.util.List;5 6 import de.ugoe.cs.eventbench.data.GlobalDataContainer;7 3 import de.ugoe.cs.eventbench.windows.data.WindowTree; 8 import de.ugoe.cs.util.console.Console;9 4 10 5 public class HandlerCreate extends MessageHandler { … … 21 16 private boolean isModal; 22 17 23 @SuppressWarnings("unchecked")24 18 @Override 25 19 public void onEndElement() { 26 20 if( hwnd!=0 ) { 27 21 WindowTree.getInstance().add(parentHwnd, hwnd, windowName, resourceId, className, isModal); 28 29 //store hwnd in GlobalDataContainer to be able to work on with them in DlgInsert30 List<String> listTargets = new ArrayList<String>();31 32 if(GlobalDataContainer.getInstance().getData("ListTargets") == null) {33 GlobalDataContainer.getInstance().addData("ListTargets", listTargets);34 }35 36 try {37 listTargets = (List<String>) GlobalDataContainer.getInstance().getData("ListTargets");38 }39 catch (ClassCastException e) {40 Console.println("Not able to cast data in GlobalDataContainer to list of targets (String)");41 }42 43 listTargets.add(WindowTree.getInstance().find(hwnd).xmlRepresentation());44 22 } 45 23 }
Note: See TracChangeset
for help on using the changeset viewer.