Changeset 145 for trunk/EventBenchConsole/src/de/ugoe/cs/eventbench
- Timestamp:
- 08/07/11 18:50:01 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/HandlerCreate.java
r75 r145 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; 3 7 import de.ugoe.cs.eventbench.windows.data.WindowTree; 8 import de.ugoe.cs.util.console.Console; 4 9 5 10 public class HandlerCreate extends MessageHandler { … … 16 21 private boolean isModal; 17 22 23 @SuppressWarnings("unchecked") 18 24 @Override 19 25 public void onEndElement() { 20 26 if( hwnd!=0 ) { 21 27 WindowTree.getInstance().add(parentHwnd, hwnd, windowName, resourceId, className, isModal); 28 29 //store hwnd in GlobalDataContainer to be able to work on with them in DlgInsert 30 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()); 22 44 } 23 45 }
Note: See TracChangeset
for help on using the changeset viewer.