Changeset 1433
- Timestamp:
- 03/04/14 12:19:00 (11 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-events-test/src/test/java/de/ugoe/cs/autoquest/eventcore/guimodel/MockGUIElement.java
r1396 r1433 50 50 51 51 @Override 52 public GUIModel getGUIModel() { 53 return null; 54 } 55 56 @Override 52 57 public void updateSpecification(IGUIElementSpec furtherSpec) { } 53 58 -
trunk/autoquest-core-events/src/main/java/de/ugoe/cs/autoquest/eventcore/guimodel/AbstractDefaultGUIElement.java
r1385 r1433 65 65 /** 66 66 * <p> 67 * the reference to the GUI model to which this GUI element belongs. 68 * </p> 69 */ 70 private GUIModel guiModel; 71 72 /** 73 * <p> 67 74 * Constructor. Creates a new AbstractDefaultGUIElement. 68 75 * </p> … … 97 104 public IGUIElement getParent() { 98 105 return parent; 106 } 107 108 /* (non-Javadoc) 109 * @see de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement#getGUIModel() 110 */ 111 @Override 112 public GUIModel getGUIModel() { 113 return guiModel; 99 114 } 100 115 … … 233 248 } 234 249 } 235 250 } 251 252 /** 253 * <p> 254 * used to set the GUI model to which this GUI element belongs. Will be set automatically, if 255 * used in combination with {@link GUIModel}; 256 * </p> 257 * 258 * @param guiModel 259 */ 260 void setGUIModel(GUIModel guiModel) { 261 this.guiModel = guiModel; 236 262 } 237 263 -
trunk/autoquest-core-events/src/main/java/de/ugoe/cs/autoquest/eventcore/guimodel/GUIElementGroup.java
r1274 r1433 50 50 * @param groupName the name of the GUI element group 51 51 * @param parent the optional parent GUI element of the group 52 * @param guiModel the GUI model to which the group will belong 52 53 */ 53 public GUIElementGroup(String groupName, IGUIElement parent ) {54 public GUIElementGroup(String groupName, IGUIElement parent, GUIModel guiModel) { 54 55 super(new GroupSpecification(groupName), parent); 56 super.setGUIModel(guiModel); 55 57 } 56 58 -
trunk/autoquest-core-events/src/main/java/de/ugoe/cs/autoquest/eventcore/guimodel/GUIModel.java
r1360 r1433 352 352 353 353 TreeNode replacement = new TreeNode(); 354 replacement.guiElement = new GUIElementGroup(groupName, parent.guiElement );354 replacement.guiElement = new GUIElementGroup(groupName, parent.guiElement, this); 355 355 356 356 for (TreeNode child : nodesToGroup) { … … 487 487 * thrown in cases such as the GUI element object could not be instantiated 488 488 */ 489 private IGUIElement integratePath(TreeNode parentNode,489 private IGUIElement integratePath(TreeNode parentNode, 490 490 List<? extends IGUIElementSpec> remainingPath, 491 IGUIElementFactory guiElementFactory)491 IGUIElementFactory guiElementFactory) 492 492 throws GUIModelException 493 493 { … … 500 500 parentNode.guiElement); 501 501 502 if (newElement instanceof AbstractDefaultGUIElement) { 503 ((AbstractDefaultGUIElement) newElement).setGUIModel(this); 504 } 505 502 506 child = parentNode.addChild(newElement); 503 507 allNodes.put(child.guiElement, child); -
trunk/autoquest-core-events/src/main/java/de/ugoe/cs/autoquest/eventcore/guimodel/IGUIElement.java
r1051 r1433 45 45 public IGUIElement getParent(); 46 46 47 /** 48 * <p> 49 * returns the GUI model to which this GUI element belongs 50 * </p> 51 */ 52 public GUIModel getGUIModel(); 53 47 54 /** 48 55 * <p>
Note: See TracChangeset
for help on using the changeset viewer.