Changeset 831 for trunk/quest-core-events/src/main/java/de
- Timestamp:
- 09/20/12 09:40:26 (12 years ago)
- Location:
- trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel
- Files:
-
- 31 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/AbstractDefaultGUIElement.java
r655 r831 1 1 2 package de.ugoe.cs.quest.eventcore.guimodel; 2 3 … … 6 7 7 8 /** 8 * TODO comment 9 * <p> 10 * Skeletal implementation for GUI elements. 11 * </p> 9 12 * 10 * @version $Revision: $ $Date: $11 * @author 2011, last modified by $Author: $13 * @version 1.0 14 * @author Patrick Harms 12 15 */ 13 16 public abstract class AbstractDefaultGUIElement implements IGUIElement { 14 15 /** */ 17 18 /** 19 * <p> 20 * Id for object serialization. 21 * </p> 22 */ 16 23 public static final long serialVersionUID = 1L; 17 24 18 /** the reference to equal GUI element manager (needed to preserve singleton behavior) */ 25 /** 26 * <p> 27 * The reference to equal GUI element manager (needed to preserve singleton behavior, even 28 * though the objects are not singleton). 29 * </p> 30 */ 19 31 private static final EqualGUIElementManager equalGUIElementManager = 20 32 new EqualGUIElementManager(); 21 33 22 /** the specification of the GUI element */ 23 private IGUIElementSpec specification; 24 25 /** the reference to the parent element */ 26 private IGUIElement parent; 27 28 /** 29 * <p> 30 * TODO: comment 31 * </p> 32 * 34 /** 35 * <p> 36 * Specification of the GUI element 37 * </p> 38 */ 39 private final IGUIElementSpec specification; 40 41 /** 42 * <p> 43 * Reference to the parent element 44 * </p> 45 */ 46 private final IGUIElement parent; 47 48 /** 49 * <p> 50 * Constructor. Creates a new AbstractDefaultGUIElement. 51 * </p> 52 * 33 53 * @param specification 54 * specification of the created GUI element 55 * @param parent 56 * parent of the created GUI element; null means the element is a top-level window 34 57 */ 35 58 public AbstractDefaultGUIElement(IGUIElementSpec specification, IGUIElement parent) { … … 48 71 } 49 72 50 /* (non-Javadoc) 73 /* 74 * (non-Javadoc) 75 * 51 76 * @see de.ugoe.cs.quest.eventcore.guimodel.IGUIElement#getParent() 52 77 */ … … 56 81 } 57 82 58 /* (non-Javadoc) 83 /* 84 * (non-Javadoc) 85 * 59 86 * @see de.ugoe.cs.quest.eventcore.guimodel.IGUIElement#addEqualGUIElement(IGUIElement) 60 87 */ 61 88 @Override 62 public void addEqualGUIElement(IGUIElement equalElement) 63 { 89 public void addEqualGUIElement(IGUIElement equalElement) { 64 90 equalGUIElementManager.addEqualGUIElements(this, equalElement); 65 91 } … … 76 102 } 77 103 78 /* (non-Javadoc) 104 /* 105 * (non-Javadoc) 106 * 79 107 * @see java.lang.Object#hashCode() 80 108 */ … … 90 118 /** 91 119 * <p> 92 * TODO comment 93 * </p> 94 * 95 * @version $Revision: $ $Date: 24.08.2012$ 96 * @author 2012, last modified by $Author: pharms$ 120 * This internal helper class manages equal GUI elements. This is necessary, as we often first 121 * identify many GUI elements as different and later use a heuristic to determine that they are 122 * the same. This class provides the means to preserve the singleton behavior of the GUI 123 * elements after we merge two GUI elements. 124 * </p> 125 * 126 * @version 1.0 127 * @author Patrick Harms 97 128 */ 98 129 private static class EqualGUIElementManager { … … 100 131 /** 101 132 * <p> 102 * the internal map of GUI elements mapping each registered element to its equal variants.133 * The internal map of GUI elements mapping each registered element to its equal variants. 103 134 * We use the {@link IdentityHashMap} as a normal hash map would not work because of the 104 135 * changing of the hash code of GUI elements at runtime. … … 107 138 private IdentityHashMap<IGUIElement, List<IGUIElement>> identityHashMap = 108 139 new IdentityHashMap<IGUIElement, List<IGUIElement>>(); 109 110 /** 111 * <p> 112 * TODO: comment 113 * </p> 114 * 115 * @param abstractDefaultGUIElement 116 * @param equalElement 140 141 /** 142 * <p> 143 * Adds a new equals relationship between two {@link IGUIElement}s to the equality manager. 144 * </p> 145 * 146 * @param guiElement1 147 * first equal GUI element 148 * @param guiElement2 149 * second equal GUI element 117 150 */ 118 151 private synchronized void addEqualGUIElements(IGUIElement guiElement1, … … 121 154 List<IGUIElement> list1 = identityHashMap.get(guiElement1); 122 155 List<IGUIElement> list2 = identityHashMap.get(guiElement2); 123 156 124 157 if (list1 == null) { 125 158 if (list2 == null) { … … 145 178 } 146 179 // else 147 // in this case, both GUI elements should already be registered with the same 148 // lists. 149 } 150 } 151 152 /** 153 * <p> 154 * TODO: comment 155 * </p> 156 * 157 * @param abstractDefaultGUIElement 158 * @return 180 // in this case, both GUI elements should already be registered with the same 181 // lists. 182 } 183 } 184 185 /** 186 * <p> 187 * Returns the object hash of a {@link IGUIElement}. 188 * </p> 189 * 190 * @param guiElement 191 * gui element whose object hash is determined 192 * @return the object hash 159 193 */ 160 194 private synchronized int hashCode(IGUIElement guiElement) { … … 164 198 /** 165 199 * <p> 166 * TODO: comment 167 * </p> 168 * 169 * @param abstractDefaultGUIElement 200 * Determines the equality of two {@link IGUIElement}s based on the information of the 201 * identify manager. Two elements are equal, if they have been added as equal using 202 * {@link #addEqualGUIElements(IGUIElement, IGUIElement)}. 203 * </p> 204 * 205 * @param guiElement 206 * GUI element to which the object is compared 170 207 * @param other 208 * object that is compared to the GUI element 171 209 * @return 172 210 */ … … 179 217 } 180 218 } 181 219 182 220 return false; 183 221 } … … 185 223 /** 186 224 * <p> 187 * TODO: comment 188 * </p> 189 * 190 * @param guiElement 191 * @return 225 * Returns the equal {@link IGUIElement} of a given {@link IGUIElement}. 226 * </p> 227 * 228 * @param guiElement 229 * GUI element of which the equal elements are returned 230 * @return the equal GUI elements 192 231 */ 193 232 private List<IGUIElement> getEqualElementsList(IGUIElement guiElement) { 194 233 List<IGUIElement> returnValue = identityHashMap.get(guiElement); 195 234 196 235 if (returnValue == null) { 197 236 returnValue = new LinkedList<IGUIElement>(); … … 199 238 identityHashMap.put(guiElement, returnValue); 200 239 } 201 240 202 241 return returnValue; 203 242 } … … 205 244 /** 206 245 * <p> 207 * TODO: comment 208 * </p> 209 * 210 * @param resultingList 211 * @param guiElement1 246 * Adds {@link IGUIElement} as equal to a list of {@link IGUIElement} if and only if it is 247 * not already contained. 248 * </p> 249 * 250 * @param equalElementsList 251 * list of {@link IGUIElement} to which the GUI element is added 252 * @param guiElement 253 * GUI element to be added 212 254 */ 213 255 private void addIfNotContained(List<IGUIElement> equalElementsList, IGUIElement guiElement) … … 218 260 } 219 261 } 220 262 221 263 equalElementsList.add(guiElement); 222 264 } -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/GUIElementFactory.java
r784 r831 1 1 2 package de.ugoe.cs.quest.eventcore.guimodel; 2 3 … … 14 15 15 16 /** 16 * TODO comment 17 * <p> 18 * Creates {@link IGUIElement}s from a given specification. Implemented as singleton. 19 * </p> 17 20 * 18 * @version $Revision: $ $Date: 13.05.2012$19 * @author 2012, last modified by $Author: patrick$21 * @version 1.0 22 * @author Patrick Harms 20 23 */ 21 24 public class GUIElementFactory implements IGUIElementFactory { 22 23 /** */ 25 26 /** 27 * <p> 28 * Instance of the class (singleton) 29 * </p> 30 */ 24 31 private static GUIElementFactory instance = new GUIElementFactory(); 25 32 26 33 /** 27 * TODO: comment 34 * <p> 35 * Constructor. Creates a new GUIElementFactory. Private to preserve singleton property. 36 * </p> 37 */ 38 private GUIElementFactory() {} 39 40 /** 41 * <p> 42 * Returns the instance of this class. 43 * </p> 28 44 * 29 */ 30 private GUIElementFactory() { 31 } 32 33 /** 34 * TODO: comment 35 * 36 * @return 45 * @return the instance 37 46 */ 38 47 public static synchronized GUIElementFactory getInstance() { … … 40 49 } 41 50 51 /** 52 * <p> 53 * A property mapping that defines to which Java class is created given the type of the GUI 54 * element found in the specification. 55 * </p> 56 */ 57 private Properties mappingsFromConfiguration; 58 42 59 43 /** */ 44 private Properties mappingsFromConfiguration; 45 46 /** 47 * TODO: comment 60 /* 61 * (non-Javadoc) 48 62 * 49 * @param object1 50 * @param object2 51 * @return 52 */ 53 protected boolean equals(Object object1, Object object2) { 54 if (object1 == object2) { 55 return true; 56 } 57 else if (object1 != null) { 58 return object1.equals(object2); 59 } 60 else { 61 // object 1 is null but object 2 not --> return false 62 return false; 63 } 64 } 65 66 /** 67 * TODO: comment 68 * 69 * @param parameterTypes 70 * @param parameters 71 * @return 72 * @throws GUIModelConfigurationException 63 * @see 64 * de.ugoe.cs.quest.eventcore.guimodel.IGUIElementFactory#instantiateGUIElement(de.ugoe.cs.quest 65 * .eventcore.guimodel.IGUIElementSpec, de.ugoe.cs.quest.eventcore.guimodel.IGUIElement) 73 66 */ 74 67 @Override … … 86 79 if (!IGUIElement.class.isAssignableFrom(clazz)) { 87 80 Console.traceln(Level.WARNING, "configured GUI element representing class " + 88 81 className + " is no valid GUIElement derivate."); 89 82 90 83 return null; … … 93 86 Constructor<?> constructor = null; 94 87 Class<?> parentClass = (parent == null) ? null : parent.getClass(); 95 88 96 89 // search for a constructor, that perfectly matches the types 97 90 for (Constructor<?> candidate : clazz.getConstructors()) { 98 if ((parentClass != null) && 99 (candidate.getParameterTypes().length == 2) && 91 if ((parentClass != null) && (candidate.getParameterTypes().length == 2) && 100 92 (candidate.getParameterTypes()[0].equals(specification.getClass())) && 101 93 (candidate.getParameterTypes()[1].equals(parentClass))) … … 113 105 } 114 106 } 115 107 116 108 if (constructor == null) { 117 109 // search for an assignable constructor … … 125 117 } 126 118 } 127 119 128 120 } 129 121 … … 205 197 206 198 /** 207 * TODO: comment 199 * <p> 200 * Loads the mappings for GUI elements. All files that start with "guimapping", end 201 * with ".txt", and are located in the folter "data/guimappings" (relative 202 * to the working directory) are loaded. 203 * </p> 208 204 * 209 * @return 205 * @return loaded GUI mappings 210 206 */ 211 207 private synchronized Properties getMappingsFromConfiguration() … … 217 213 else { 218 214 mappingsFromConfiguration = new Properties(); 219 215 220 216 File mappingsFolder = new File("data/guimappings"); 221 217 File[] children = mappingsFolder.listFiles(); 222 218 223 219 if (children != null) { 224 220 for (File mappingsFile : children) { … … 233 229 } 234 230 catch (FileNotFoundException e) { 235 throw new GUIModelConfigurationException 236 ("could not read mapping configuration file " + mappingsFile, e); 231 throw new GUIModelConfigurationException( 232 "could not read mapping configuration file " + 233 mappingsFile, e); 237 234 } 238 235 catch (IOException e) { 239 throw new GUIModelConfigurationException 240 ("could not read mapping configuration file " + mappingsFile, e); 236 throw new GUIModelConfigurationException( 237 "could not read mapping configuration file " + 238 mappingsFile, e); 241 239 } 242 240 finally { … … 254 252 } 255 253 else { 256 throw new GUIModelConfigurationException 257 ("no GUI mappings file provided in folder " + mappingsFolder); 254 throw new GUIModelConfigurationException( 255 "no GUI mappings file provided in folder " + 256 mappingsFolder); 258 257 } 259 258 -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/GUIModel.java
r821 r831 27 27 /** 28 28 * <p> 29 * the root node of the tree not provided externally.29 * The root node of the tree not provided externally. 30 30 * </p> 31 31 */ … … 34 34 /** 35 35 * <p> 36 * alist with all nodes currently known36 * A list with all nodes currently known 37 37 * </p> 38 38 */ … … 277 277 * is returned. 278 278 * </p> 279 * 280 * @param parentNode 281 * parent node whose children are searched 282 * @param specToMatch 283 * specification that is searched for 284 * @return matching child node or null if no child matches 279 285 */ 280 286 private TreeNode findEqualChild(TreeNode parentNode, IGUIElementSpec specToMatch) { … … 302 308 * can merge the children, too. 303 309 * </p> 310 * 311 * @param subTreeRoot 312 * root node of the sub-tree that is merged 304 313 */ 305 314 private void mergeSubTree(TreeNode subTreeRoot) { … … 346 355 * </p> 347 356 * 357 * @param treeNode1 358 * the first of the two nodes to be merged 359 * @param treeNode2 360 * the second of the two nodes to be merged 348 361 * @return a tree node being the merge of the two provided nodes. 349 362 */ … … 389 402 * element as well as a indented list of its children surrounded by braces. 390 403 * </p> 404 * 405 * @param out 406 * {@link PrintStream} where the guiElement is dumped to 407 * @param guiElement 408 * the guiElement whos string represenation is dumped 409 * @param indent 410 * indent string of the dumping 391 411 */ 392 412 private void dumpGUIElement(PrintStream out, IGUIElement guiElement, String indent) { … … 412 432 /** 413 433 * <p> 414 * used internally for building up the tree of GUI elements. 415 * </p> 434 * Used internally for building up the tree of GUI elements. 435 * </p> 436 * 437 * @version 1.0 438 * @author Patrick Harms, Steffen Herbold 416 439 */ 417 440 private class TreeNode { 418 /** */419 private IGUIElement guiElement;420 421 /** */422 private List<TreeNode> children;423 441 424 442 /** 425 443 * <p> 426 * adds a child to the current node while keeping all lists of nodes up to date444 * GUI element associated with the TreeNode. 427 445 * </p> 446 */ 447 private IGUIElement guiElement; 448 449 /** 450 * <p> 451 * Children of the TreeNode. 452 * </p> 453 */ 454 private List<TreeNode> children; 455 456 /** 457 * <p> 458 * Adds a child to the current node while keeping all lists of nodes up to date 459 * </p> 460 * 461 * @param guiElement 462 * GUI element that will be associated with the new child 463 * @return the added child 428 464 */ 429 465 private TreeNode addChild(IGUIElement guiElement) { … … 446 482 * Adds a TreeNode as child to the current node. This way, the whole sub-tree is added. 447 483 * </p> 484 * 485 * @param node 486 * child node that is added 487 * @return node that has been added 448 488 */ 449 489 private TreeNode addChildNode(TreeNode node) { -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/GUIModelConfigurationException.java
r655 r831 1 1 2 package de.ugoe.cs.quest.eventcore.guimodel; 2 3 3 4 /** 4 * TODO comment 5 * <p> 6 * Exception that is thrown if there is a failure during the creation of a {@link IGUIElement} by 7 * the {@link GUIElementFactory}. 8 * </p> 5 9 * 6 * @version $Revision: $ $Date: 27.05.2012$7 * @author 2012, last modified by $Author: patrick$10 * @version 1.0 11 * @author Patrick Harms 8 12 */ 9 13 public class GUIModelConfigurationException extends GUIModelException { 10 14 11 /** */ 15 /** 16 * <p> 17 * Id for object serialization. 18 * </p> 19 */ 12 20 private static final long serialVersionUID = 1L; 13 21 14 22 /** 15 * TODO: comment 16 * 23 * <p> 24 * Constructor. Creates a new GUIModelConfigurationException. 25 * </p> 17 26 */ 18 27 public GUIModelConfigurationException() { … … 21 30 22 31 /** 23 * TODO: comment 32 * <p> 33 * Constructor. Creates a new GUIModelConfigurationException. 34 * </p> 24 35 * 25 36 * @param message 37 * message of the exception 26 38 */ 27 39 public GUIModelConfigurationException(String message) { … … 30 42 31 43 /** 32 * TODO: comment 44 * <p> 45 * Constructor. Creates a new GUIModelConfigurationException. 46 * </p> 33 47 * 34 48 * @param cause 49 * cause of the exception 35 50 */ 36 51 public GUIModelConfigurationException(Throwable cause) { … … 39 54 40 55 /** 41 * TODO: comment 56 * <p> 57 * Constructor. Creates a new GUIModelConfigurationException. 58 * </p> 42 59 * 43 60 * @param message 61 * message of the exception 44 62 * @param cause 63 * cause of the exception 45 64 */ 46 65 public GUIModelConfigurationException(String message, Throwable cause) { -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/GUIModelException.java
r655 r831 1 1 2 package de.ugoe.cs.quest.eventcore.guimodel; 2 3 3 4 /** 4 * TODO comment 5 * <p> 6 * Exception that is thrown if there are problems with the {@link GUIModel}. 7 * </p> 5 8 * 6 * @version $Revision: $ $Date: 14.08.2012$7 * @author 2012, last modified by $Author: pharms$9 * @version 1.0 10 * @author Patrick Harms 8 11 */ 9 12 public class GUIModelException extends Exception { 10 13 11 /** */ 14 /** 15 * <p> 16 * Id for object serialization. 17 * </p> 18 */ 12 19 private static final long serialVersionUID = 1L; 13 20 14 21 /** 15 * TODO: comment 16 * 22 * <p> 23 * Constructor. Creates a new GUIModelException. 24 * </p> 17 25 */ 18 26 public GUIModelException() { … … 21 29 22 30 /** 23 * TODO: comment 24 * 31 * <p> 32 * Constructor. Creates a new GUIModelException. 33 * </p> 34 * 25 35 * @param message 36 * message of the exception 26 37 */ 27 38 public GUIModelException(String message) { … … 30 41 31 42 /** 32 * TODO: comment 33 * 43 * <p> 44 * Constructor. Creates a new GUIModelException. 45 * </p> 46 * 34 47 * @param cause 48 * cause of the exception 35 49 */ 36 50 public GUIModelException(Throwable cause) { … … 39 53 40 54 /** 41 * TODO: comment 42 * 55 * <p> 56 * Constructor. Creates a new GUIModelException. 57 * </p> 58 * 43 59 * @param message 60 * message of the exception 44 61 * @param cause 62 * cause of the exception 45 63 */ 46 64 public GUIModelException(String message, Throwable cause) { -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/IButton.java
r748 r831 3 3 /** 4 4 * <p> 5 * marker interface for GUI elements that represent a button5 * Marker interface for GUI elements that represent a button 6 6 * </p> 7 7 * 8 * @version 1.0 8 9 * @author Patrick Harms 9 10 */ -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/ICanvas.java
r748 r831 3 3 /** 4 4 * <p> 5 * marker interface for GUI elements that represent a canvas, i.e. something to display data or5 * Marker interface for GUI elements that represent a canvas, i.e. something to display data or 6 6 * media 7 7 * </p> 8 8 * 9 * @version 1.0 9 10 * @author Patrick Harms 10 11 */ -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/ICheckBox.java
r748 r831 3 3 /** 4 4 * <p> 5 * marker interface for GUI elements that represent a check box5 * Marker interface for GUI elements that represent a check box 6 6 * </p> 7 7 * 8 * @version 1.0 8 9 * @author Patrick Harms 9 10 */ -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/IComboBox.java
r748 r831 3 3 /** 4 4 * <p> 5 * marker interface for GUI elements that represent a combo box5 * Marker interface for GUI elements that represent a combo box 6 6 * </p> 7 7 * 8 * @version 1.0 8 9 * @author Patrick Harms 9 10 */ -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/IDialog.java
r748 r831 3 3 /** 4 4 * <p> 5 * marker interface for GUI elements that represent a dialog5 * Marker interface for GUI elements that represent a dialog 6 6 * </p> 7 7 * 8 * @version 1.0 8 9 * @author Patrick Harms 9 10 */ -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/IFrame.java
r748 r831 3 3 /** 4 4 * <p> 5 * marker interface for GUI elements that represent a frame or window5 * Marker interface for GUI elements that represent a frame or window 6 6 * </p> 7 7 * 8 * @version 1.0 8 9 * @author Patrick Harms 9 10 */ -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/IGUIElement.java
r655 r831 1 1 2 package de.ugoe.cs.quest.eventcore.guimodel; 2 3 … … 5 6 /** 6 7 * <p> 7 * TODO comment8 * Common interface for all GUI elements. 8 9 * </p> 9 10 * 10 * @version $Revision: $ $Date: $11 * @author 2011, last modified by $Author: $11 * @version 1.0 12 * @author Patrick Harms 12 13 */ 13 14 public interface IGUIElement extends IEventTarget { 14 15 15 16 /** 16 17 * <p> 17 * TODO comment18 * Returns the specification of the GUI element. 18 19 * </p> 20 * 21 * @return the specification 19 22 */ 20 23 public IGUIElementSpec getSpecification(); … … 22 25 /** 23 26 * <p> 24 * TODO comment27 * Returns the parent of the GUI element. 25 28 * </p> 29 * 30 * @return the parent 26 31 */ 27 32 public IGUIElement getParent(); … … 29 34 /** 30 35 * <p> 31 * TODO comment36 * Defines that {@link IGUIElement} implementations have to define equals. 32 37 * </p> 33 * 34 * @param other 35 * @return 38 * 39 * @see Object#equals(Object) 36 40 */ 41 @Override 37 42 public boolean equals(Object other); 38 43 39 44 /** 40 45 * <p> 41 * TODO comment46 * Defines that {@link IGUIElement} implementations have to define hashCode. 42 47 * </p> 48 * 49 * @see Object#hashCode() 43 50 */ 51 @Override 44 52 public int hashCode(); 45 53 46 54 /** 47 55 * <p> 48 * TODO comment 56 * Updates the specification of a GUI element with another specification, e.g., to add further 57 * known names of the GUI element. 49 58 * </p> 59 * 60 * @param furtherSpec 61 * additional specification 50 62 */ 51 63 public void updateSpecification(IGUIElementSpec furtherSpec); … … 53 65 /** 54 66 * <p> 55 * TODO: comment 67 * The {@link IGUIElement} that is passed by this function is equal to the current GUI element 68 * and will hereafter be treated as such. 56 69 * </p> 57 * 70 * 58 71 * @param guiElement 72 * GUI element that is equal 59 73 */ 60 74 public void addEqualGUIElement(IGUIElement equalElement); -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/IGUIElementFactory.java
r655 r831 3 3 /** 4 4 * <p> 5 * TODO comment5 * Common interface for GUI element factories. 6 6 * </p> 7 7 * 8 * @version $Revision: $ $Date: 17.08.2012$9 * @author 2012, last modified by $Author: pharms$8 * @version 1.0 9 * @author Patrick Harms 10 10 */ 11 11 public interface IGUIElementFactory { … … 13 13 /** 14 14 * <p> 15 * TODO: comment15 * Instantiates a new {@link IGUIElement} from a given specification. 16 16 * </p> 17 * 17 * 18 18 * @param specification 19 * @return 19 * specification of the new GUI element 20 * @param parent 21 * parent of the new GUI element 22 * @return created GUI element 23 * @throws GUIModelConfigurationException 24 * thrown if there is a problem during the creation of the GUI element 20 25 */ 21 26 public IGUIElement instantiateGUIElement(IGUIElementSpec specification, IGUIElement parent) -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/IGUIElementSpec.java
r778 r831 1 1 2 package de.ugoe.cs.quest.eventcore.guimodel; 2 3 … … 5 6 /** 6 7 * <p> 7 * TODO comment8 * Common interface for GUI element specifications. 8 9 * </p> 9 10 * 10 * @version $Revision: $ $Date: 17.08.2012$11 * @author 2012, last modified by $Author: pharms$11 * @version 1.0 12 * @author Patrick Harms 12 13 */ 13 14 public interface IGUIElementSpec extends Serializable { … … 15 16 /** 16 17 * <p> 17 * TODO: comment18 * Returns a string represenation of the GUI element type that this specification represents. 18 19 * </p> 19 * 20 * 20 21 * @return 21 22 */ 22 23 public String getType(); 23 24 24 25 /** 25 26 * <p> 26 * TODO: comment 27 * Evaluates if two GUI specifications are similar. Similar means that a heuristic determines 28 * that the two GUI specifications describe the same GUI element. 27 29 * </p> 28 * 30 * 29 31 * @param other 30 * @return 32 * specification whose similarity to this is evaluated 33 * @return true if the specifications are similar; false otherwise 31 34 */ 32 35 public boolean getSimilarity(IGUIElementSpec other); … … 34 37 /** 35 38 * <p> 36 * TODO: comment39 * Defines that {@link IGUIElement} implementations have to define equals. 37 40 * </p> 38 * 39 * @param other 40 * @return 41 * 42 * @see Object#equals(Object) 41 43 */ 42 public boolean equals(IGUIElementSpec other); 43 44 @Override 45 public boolean equals(Object other); 46 44 47 /** 45 48 * <p> 46 * TODO: comment49 * Defines that {@link IGUIElement} implementations have to define hashCode. 47 50 * </p> 48 * 49 * @ return51 * 52 * @see Object#hashCode() 50 53 */ 54 @Override 51 55 public int hashCode(); 52 56 } -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/IListBox.java
r748 r831 3 3 /** 4 4 * <p> 5 * marker interface for GUI elements that represent a list or list box5 * Marker interface for GUI elements that represent a list or list box 6 6 * </p> 7 7 * 8 * @version 1.0 8 9 * @author Patrick Harms 9 10 */ -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/IMenu.java
r748 r831 3 3 /** 4 4 * <p> 5 * marker interface for GUI elements that represent a menu5 * Marker interface for GUI elements that represent a menu 6 6 * </p> 7 7 * 8 * @version 1.0 8 9 * @author Patrick Harms 9 10 */ -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/IMenuBar.java
r748 r831 3 3 /** 4 4 * <p> 5 * marker interface for GUI elements that represent a menu bar5 * Marker interface for GUI elements that represent a menu bar 6 6 * </p> 7 7 * 8 * @version 1.0 8 9 * @author Patrick Harms 9 10 */ -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/IMenuButton.java
r748 r831 3 3 /** 4 4 * <p> 5 * marker interface for GUI elements that represent a button in a menu5 * Marker interface for GUI elements that represent a button in a menu 6 6 * </p> 7 7 * 8 * @version 1.0 8 9 * @author Patrick Harms 9 10 */ -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/IPanel.java
r748 r831 3 3 /** 4 4 * <p> 5 * marker interface for GUI elements that represent a panel for structuring GUI content5 * Marker interface for GUI elements that represent a panel for structuring GUI content 6 6 * </p> 7 7 * 8 * @version 1.0 8 9 * @author Patrick Harms 9 10 */ -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/IRadioButton.java
r748 r831 3 3 /** 4 4 * <p> 5 * marker interface for GUI elements that represent a radio button5 * Marker interface for GUI elements that represent a radio button 6 6 * </p> 7 7 * 8 * @version 1.0 8 9 * @author Patrick Harms 9 10 */ -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/IScrollBar.java
r748 r831 3 3 /** 4 4 * <p> 5 * marker interface for GUI elements that represent a scroll bar of a scroll pane5 * Marker interface for GUI elements that represent a scroll bar of a scroll pane 6 6 * </p> 7 7 * 8 * @version 1.0 8 9 * @author Patrick Harms 9 10 */ -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/IScrollPane.java
r748 r831 3 3 /** 4 4 * <p> 5 * marker interface for GUI elements that represent a scroll pane5 * Marker interface for GUI elements that represent a scroll pane 6 6 * </p> 7 7 * 8 * @version 1.0 8 9 * @author Patrick Harms 9 10 */ -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/IShape.java
r748 r831 3 3 /** 4 4 * <p> 5 * marker interface for GUI elements that represent any kind of shape not covered by the other5 * Marker interface for GUI elements that represent any kind of shape not covered by the other 6 6 * marker interfaces 7 7 * </p> 8 8 * 9 * @version 1.0 9 10 * @author Patrick Harms 10 11 */ -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/ISplitPane.java
r748 r831 3 3 /** 4 4 * <p> 5 * marker interface for GUI elements that represent a split pane5 * Marker interface for GUI elements that represent a split pane 6 6 * </p> 7 7 * 8 * @version 1.0 8 9 * @author Patrick Harms 9 10 */ -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/ITabbedPane.java
r748 r831 3 3 /** 4 4 * <p> 5 * marker interface for GUI elements that represent a tabbed pane5 * Marker interface for GUI elements that represent a tabbed pane 6 6 * </p> 7 7 * 8 * @version 1.0 8 9 * @author Patrick Harms 9 10 */ -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/ITable.java
r748 r831 3 3 /** 4 4 * <p> 5 * marker interface for GUI elements that represent a table5 * Marker interface for GUI elements that represent a table 6 6 * </p> 7 7 * 8 * @version 1.0 8 9 * @author Patrick Harms 9 10 */ -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/ITextArea.java
r748 r831 3 3 /** 4 4 * <p> 5 * marker interface for GUI elements that represent a multi line text area5 * Marker interface for GUI elements that represent a multi line text area 6 6 * </p> 7 7 * 8 * @version 1.0 8 9 * @author Patrick Harms 9 10 */ -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/ITextField.java
r748 r831 3 3 /** 4 4 * <p> 5 * marker interface for GUI elements that represent a single line text field5 * Marker interface for GUI elements that represent a single line text field 6 6 * </p> 7 7 * 8 * @version 1.0 8 9 * @author Patrick Harms 9 10 */ -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/IToolBar.java
r748 r831 3 3 /** 4 4 * <p> 5 * marker interface for GUI elements that represent a tool bar5 * Marker interface for GUI elements that represent a tool bar 6 6 * </p> 7 7 * 8 * @version 1.0 8 9 * @author Patrick Harms 9 10 */ -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/ITrackBar.java
r748 r831 3 3 /** 4 4 * <p> 5 * marker interface for GUI elements that represent a track bar5 * Marker interface for GUI elements that represent a track bar 6 6 * </p> 7 7 * 8 * @version 1.0 8 9 * @author Patrick Harms 9 10 */ -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/ITree.java
r748 r831 3 3 /** 4 4 * <p> 5 * marker interface for GUI elements that represent a tree view5 * Marker interface for GUI elements that represent a tree view 6 6 * </p> 7 7 * 8 * @version 1.0 8 9 * @author Patrick Harms 9 10 */
Note: See TracChangeset
for help on using the changeset viewer.