Changeset 1068 for trunk/autoquest-core-events/src
- Timestamp:
- 02/14/13 15:16:21 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-events/src/main/java/de/ugoe/cs/autoquest/eventcore/guimodel/GUIElementTree.java
r1026 r1068 125 125 * id of the parent GUI element 126 126 * @param guiElementSpec 127 * 127 * the GUI element specification 128 128 */ 129 129 public void add(T guiElementID, 130 130 T parentID, 131 131 IGUIElementSpec guiElementSpec) 132 132 { … … 134 134 135 135 if (guiElement == null) { 136 136 IGUIElementSpec parent = guiElementSpecs.get(parentID); 137 137 if (parent != null) { 138 138 List<T> otherChildren = childRelations.get(parentID); … … 184 184 /** 185 185 * <p> 186 * Returns the id of the provided {@link IGUIElement}. The comparison is performed using the 187 * equals method of the GUI element. 188 * </p> 189 * 190 * @param guiElement 191 * guiElement that is looked for 192 * @return the id of the GUI element, null if the GUI element can not be found 193 */ 194 public T find(IGUIElement guiElement) { 195 for (Map.Entry<T, IGUIElement> entry : guiElements.entrySet()) { 196 if (guiElement.equals(entry.getValue())) { 197 return entry.getKey(); 198 } 199 } 200 201 return null; 202 } 203 204 /** 205 * <p> 186 206 * Removes a GUI element (defined by its id) from the tree. All children of the GUI element will be 187 207 * removed recursively. … … 197 217 198 218 if (node != null) { 199 219 removedCounter++; 200 220 List<T> nodesToBeRemoved = childRelations.remove(id); 201 221
Note: See TracChangeset
for help on using the changeset viewer.