Changeset 831


Ignore:
Timestamp:
09/20/12 09:40:26 (12 years ago)
Author:
sherbold
Message:
  • code documentation and clean-up
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 
    12package de.ugoe.cs.quest.eventcore.guimodel; 
    23 
     
    67 
    78/** 
    8  * TODO comment 
     9 * <p> 
     10 * Skeletal implementation for GUI elements. 
     11 * </p> 
    912 *  
    10  * @version $Revision: $ $Date: $ 
    11  * @author 2011, last modified by $Author: $ 
     13 * @version 1.0 
     14 * @author Patrick Harms 
    1215 */ 
    1316public abstract class AbstractDefaultGUIElement implements IGUIElement { 
    14      
    15     /**  */ 
     17 
     18    /** 
     19     * <p> 
     20     * Id for object serialization. 
     21     * </p> 
     22     */ 
    1623    public static final long serialVersionUID = 1L; 
    1724 
    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     */ 
    1931    private static final EqualGUIElementManager equalGUIElementManager = 
    2032        new EqualGUIElementManager(); 
    2133 
    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     *  
    3353     * @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 
    3457     */ 
    3558    public AbstractDefaultGUIElement(IGUIElementSpec specification, IGUIElement parent) { 
     
    4871    } 
    4972 
    50     /* (non-Javadoc) 
     73    /* 
     74     * (non-Javadoc) 
     75     *  
    5176     * @see de.ugoe.cs.quest.eventcore.guimodel.IGUIElement#getParent() 
    5277     */ 
     
    5681    } 
    5782 
    58     /* (non-Javadoc) 
     83    /* 
     84     * (non-Javadoc) 
     85     *  
    5986     * @see de.ugoe.cs.quest.eventcore.guimodel.IGUIElement#addEqualGUIElement(IGUIElement) 
    6087     */ 
    6188    @Override 
    62     public void addEqualGUIElement(IGUIElement equalElement) 
    63     { 
     89    public void addEqualGUIElement(IGUIElement equalElement) { 
    6490        equalGUIElementManager.addEqualGUIElements(this, equalElement); 
    6591    } 
     
    76102    } 
    77103 
    78     /* (non-Javadoc) 
     104    /* 
     105     * (non-Javadoc) 
     106     *  
    79107     * @see java.lang.Object#hashCode() 
    80108     */ 
     
    90118    /** 
    91119     * <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 
    97128     */ 
    98129    private static class EqualGUIElementManager { 
     
    100131        /** 
    101132         * <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. 
    103134         * We use the {@link IdentityHashMap} as a normal hash map would not work because of the 
    104135         * changing of the hash code of GUI elements at runtime. 
     
    107138        private IdentityHashMap<IGUIElement, List<IGUIElement>> identityHashMap = 
    108139            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 
    117150         */ 
    118151        private synchronized void addEqualGUIElements(IGUIElement guiElement1, 
     
    121154            List<IGUIElement> list1 = identityHashMap.get(guiElement1); 
    122155            List<IGUIElement> list2 = identityHashMap.get(guiElement2); 
    123              
     156 
    124157            if (list1 == null) { 
    125158                if (list2 == null) { 
     
    145178                } 
    146179                // 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 
    159193         */ 
    160194        private synchronized int hashCode(IGUIElement guiElement) { 
     
    164198        /** 
    165199         * <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 
    170207         * @param other 
     208         *            object that is compared to the GUI element 
    171209         * @return 
    172210         */ 
     
    179217                } 
    180218            } 
    181              
     219 
    182220            return false; 
    183221        } 
     
    185223        /** 
    186224         * <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 
    192231         */ 
    193232        private List<IGUIElement> getEqualElementsList(IGUIElement guiElement) { 
    194233            List<IGUIElement> returnValue = identityHashMap.get(guiElement); 
    195              
     234 
    196235            if (returnValue == null) { 
    197236                returnValue = new LinkedList<IGUIElement>(); 
     
    199238                identityHashMap.put(guiElement, returnValue); 
    200239            } 
    201              
     240 
    202241            return returnValue; 
    203242        } 
     
    205244        /** 
    206245         * <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 
    212254         */ 
    213255        private void addIfNotContained(List<IGUIElement> equalElementsList, IGUIElement guiElement) 
     
    218260                } 
    219261            } 
    220              
     262 
    221263            equalElementsList.add(guiElement); 
    222264        } 
  • trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/GUIElementFactory.java

    r784 r831  
     1 
    12package de.ugoe.cs.quest.eventcore.guimodel; 
    23 
     
    1415 
    1516/** 
    16  * TODO comment 
     17 * <p> 
     18 * Creates {@link IGUIElement}s from a given specification. Implemented as singleton. 
     19 * </p> 
    1720 *  
    18  * @version $Revision: $ $Date: 13.05.2012$ 
    19  * @author 2012, last modified by $Author: patrick$ 
     21 * @version 1.0 
     22 * @author Patrick Harms 
    2023 */ 
    2124public class GUIElementFactory implements IGUIElementFactory { 
    22      
    23     /** */ 
     25 
     26    /** 
     27     * <p> 
     28     * Instance of the class (singleton) 
     29     * </p> 
     30     */ 
    2431    private static GUIElementFactory instance = new GUIElementFactory(); 
    2532 
    2633    /** 
    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> 
    2844     *  
    29      */ 
    30     private GUIElementFactory() { 
    31     } 
    32  
    33     /** 
    34      * TODO: comment 
    35      *  
    36      * @return 
     45     * @return the instance 
    3746     */ 
    3847    public static synchronized GUIElementFactory getInstance() { 
     
    4049    } 
    4150 
     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 
    4259     
    43     /** */ 
    44     private Properties mappingsFromConfiguration; 
    45  
    46     /** 
    47      * TODO: comment 
     60    /* 
     61     * (non-Javadoc) 
    4862     *  
    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) 
    7366     */ 
    7467    @Override 
     
    8679                if (!IGUIElement.class.isAssignableFrom(clazz)) { 
    8780                    Console.traceln(Level.WARNING, "configured GUI element representing class " + 
    88                                     className + " is no valid GUIElement derivate."); 
     81                        className + " is no valid GUIElement derivate."); 
    8982 
    9083                    return null; 
     
    9386                Constructor<?> constructor = null; 
    9487                Class<?> parentClass = (parent == null) ? null : parent.getClass(); 
    95                  
     88 
    9689                // search for a constructor, that perfectly matches the types 
    9790                for (Constructor<?> candidate : clazz.getConstructors()) { 
    98                     if ((parentClass != null) && 
    99                         (candidate.getParameterTypes().length == 2) && 
     91                    if ((parentClass != null) && (candidate.getParameterTypes().length == 2) && 
    10092                        (candidate.getParameterTypes()[0].equals(specification.getClass())) && 
    10193                        (candidate.getParameterTypes()[1].equals(parentClass))) 
     
    113105                    } 
    114106                } 
    115                  
     107 
    116108                if (constructor == null) { 
    117109                    // search for an assignable constructor 
     
    125117                        } 
    126118                    } 
    127                      
     119 
    128120                } 
    129121                 
     
    205197 
    206198    /** 
    207      * TODO: comment 
     199     * <p> 
     200     * Loads the mappings for GUI elements. All files that start with &quot;guimapping&quot;, end 
     201     * with &quot;.txt&quot;, and are located in the folter &quot;data/guimappings&quot; (relative 
     202     * to the working directory) are loaded. 
     203     * </p> 
    208204     *  
    209      * @return 
     205     * @return loaded GUI mappings 
    210206     */ 
    211207    private synchronized Properties getMappingsFromConfiguration() 
     
    217213        else { 
    218214            mappingsFromConfiguration = new Properties(); 
    219              
     215 
    220216            File mappingsFolder = new File("data/guimappings"); 
    221217            File[] children = mappingsFolder.listFiles(); 
    222              
     218 
    223219            if (children != null) { 
    224220                for (File mappingsFile : children) { 
     
    233229                        } 
    234230                        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); 
    237234                        } 
    238235                        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); 
    241239                        } 
    242240                        finally { 
     
    254252            } 
    255253            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); 
    258257            } 
    259258 
  • trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/GUIModel.java

    r821 r831  
    2727    /** 
    2828     * <p> 
    29      * the root node of the tree not provided externally. 
     29     * The root node of the tree not provided externally. 
    3030     * </p> 
    3131     */ 
     
    3434    /** 
    3535     * <p> 
    36      * a list with all nodes currently known 
     36     * A list with all nodes currently known 
    3737     * </p> 
    3838     */ 
     
    277277     * is returned. 
    278278     * </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 
    279285     */ 
    280286    private TreeNode findEqualChild(TreeNode parentNode, IGUIElementSpec specToMatch) { 
     
    302308     * can merge the children, too. 
    303309     * </p> 
     310     *  
     311     * @param subTreeRoot 
     312     *            root node of the sub-tree that is merged 
    304313     */ 
    305314    private void mergeSubTree(TreeNode subTreeRoot) { 
     
    346355     * </p> 
    347356     *  
     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 
    348361     * @return a tree node being the merge of the two provided nodes. 
    349362     */ 
     
    389402     * element as well as a indented list of its children surrounded by braces. 
    390403     * </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 
    391411     */ 
    392412    private void dumpGUIElement(PrintStream out, IGUIElement guiElement, String indent) { 
     
    412432    /** 
    413433     * <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 
    416439     */ 
    417440    private class TreeNode { 
    418         /** */ 
    419         private IGUIElement guiElement; 
    420  
    421         /** */ 
    422         private List<TreeNode> children; 
    423441 
    424442        /** 
    425443         * <p> 
    426          * adds a child to the current node while keeping all lists of nodes up to date 
     444         * GUI element associated with the TreeNode. 
    427445         * </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 
    428464         */ 
    429465        private TreeNode addChild(IGUIElement guiElement) { 
     
    446482         * Adds a TreeNode as child to the current node. This way, the whole sub-tree is added. 
    447483         * </p> 
     484         *  
     485         * @param node 
     486         *            child node that is added 
     487         * @return node that has been added 
    448488         */ 
    449489        private TreeNode addChildNode(TreeNode node) { 
  • trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/GUIModelConfigurationException.java

    r655 r831  
     1 
    12package de.ugoe.cs.quest.eventcore.guimodel; 
    23 
    34/** 
    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> 
    59 *  
    6  * @version $Revision: $ $Date: 27.05.2012$ 
    7  * @author 2012, last modified by $Author: patrick$ 
     10 * @version 1.0 
     11 * @author Patrick Harms 
    812 */ 
    913public class GUIModelConfigurationException extends GUIModelException { 
    1014 
    11     /**  */ 
     15    /** 
     16     * <p> 
     17     * Id for object serialization. 
     18     * </p> 
     19     */ 
    1220    private static final long serialVersionUID = 1L; 
    1321 
    1422    /** 
    15      * TODO: comment 
    16      *  
     23     * <p> 
     24     * Constructor. Creates a new GUIModelConfigurationException. 
     25     * </p> 
    1726     */ 
    1827    public GUIModelConfigurationException() { 
     
    2130 
    2231    /** 
    23      * TODO: comment 
     32     * <p> 
     33     * Constructor. Creates a new GUIModelConfigurationException. 
     34     * </p> 
    2435     *  
    2536     * @param message 
     37     *            message of the exception 
    2638     */ 
    2739    public GUIModelConfigurationException(String message) { 
     
    3042 
    3143    /** 
    32      * TODO: comment 
     44     * <p> 
     45     * Constructor. Creates a new GUIModelConfigurationException. 
     46     * </p> 
    3347     *  
    3448     * @param cause 
     49     *            cause of the exception 
    3550     */ 
    3651    public GUIModelConfigurationException(Throwable cause) { 
     
    3954 
    4055    /** 
    41      * TODO: comment 
     56     * <p> 
     57     * Constructor. Creates a new GUIModelConfigurationException. 
     58     * </p> 
    4259     *  
    4360     * @param message 
     61     *            message of the exception 
    4462     * @param cause 
     63     *            cause of the exception 
    4564     */ 
    4665    public GUIModelConfigurationException(String message, Throwable cause) { 
  • trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/GUIModelException.java

    r655 r831  
     1 
    12package de.ugoe.cs.quest.eventcore.guimodel; 
    23 
    34/** 
    4  * TODO comment 
     5 * <p> 
     6 * Exception that is thrown if there are problems with the {@link GUIModel}. 
     7 * </p> 
    58 *  
    6  * @version $Revision: $ $Date: 14.08.2012$ 
    7  * @author 2012, last modified by $Author: pharms$ 
     9 * @version 1.0 
     10 * @author Patrick Harms 
    811 */ 
    912public class GUIModelException extends Exception { 
    1013 
    11     /**  */ 
     14    /** 
     15     * <p> 
     16     * Id for object serialization. 
     17     * </p> 
     18     */ 
    1219    private static final long serialVersionUID = 1L; 
    1320 
    1421    /** 
    15      * TODO: comment 
    16      * 
     22     * <p> 
     23     * Constructor. Creates a new GUIModelException. 
     24     * </p> 
    1725     */ 
    1826    public GUIModelException() { 
     
    2129 
    2230    /** 
    23      * TODO: comment 
    24      * 
     31     * <p> 
     32     * Constructor. Creates a new GUIModelException. 
     33     * </p> 
     34     *  
    2535     * @param message 
     36     *            message of the exception 
    2637     */ 
    2738    public GUIModelException(String message) { 
     
    3041 
    3142    /** 
    32      * TODO: comment 
    33      * 
     43     * <p> 
     44     * Constructor. Creates a new GUIModelException. 
     45     * </p> 
     46     *  
    3447     * @param cause 
     48     *            cause of the exception 
    3549     */ 
    3650    public GUIModelException(Throwable cause) { 
     
    3953 
    4054    /** 
    41      * TODO: comment 
    42      * 
     55     * <p> 
     56     * Constructor. Creates a new GUIModelException. 
     57     * </p> 
     58     *  
    4359     * @param message 
     60     *            message of the exception 
    4461     * @param cause 
     62     *            cause of the exception 
    4563     */ 
    4664    public GUIModelException(String message, Throwable cause) { 
  • trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/IButton.java

    r748 r831  
    33/** 
    44 * <p> 
    5  * marker interface for GUI elements that represent a button 
     5 * Marker interface for GUI elements that represent a button 
    66 * </p> 
    77 *  
     8 * @version 1.0 
    89 * @author Patrick Harms 
    910 */ 
  • trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/ICanvas.java

    r748 r831  
    33/** 
    44 * <p> 
    5  * marker interface for GUI elements that represent a canvas, i.e. something to display data or 
     5 * Marker interface for GUI elements that represent a canvas, i.e. something to display data or 
    66 * media 
    77 * </p> 
    88 *  
     9 * @version 1.0 
    910 * @author Patrick Harms 
    1011 */ 
  • trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/ICheckBox.java

    r748 r831  
    33/** 
    44 * <p> 
    5  * marker interface for GUI elements that represent a check box 
     5 * Marker interface for GUI elements that represent a check box 
    66 * </p> 
    77 *  
     8 * @version 1.0 
    89 * @author Patrick Harms 
    910 */ 
  • trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/IComboBox.java

    r748 r831  
    33/** 
    44 * <p> 
    5  * marker interface for GUI elements that represent a combo box 
     5 * Marker interface for GUI elements that represent a combo box 
    66 * </p> 
    77 *  
     8 * @version 1.0 
    89 * @author Patrick Harms 
    910 */ 
  • trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/IDialog.java

    r748 r831  
    33/** 
    44 * <p> 
    5  * marker interface for GUI elements that represent a dialog 
     5 * Marker interface for GUI elements that represent a dialog 
    66 * </p> 
    77 *  
     8 * @version 1.0 
    89 * @author Patrick Harms 
    910 */ 
  • trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/IFrame.java

    r748 r831  
    33/** 
    44 * <p> 
    5  * marker interface for GUI elements that represent a frame or window 
     5 * Marker interface for GUI elements that represent a frame or window 
    66 * </p> 
    77 *  
     8 * @version 1.0 
    89 * @author Patrick Harms 
    910 */ 
  • trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/IGUIElement.java

    r655 r831  
     1 
    12package de.ugoe.cs.quest.eventcore.guimodel; 
    23 
     
    56/** 
    67 * <p> 
    7  * TODO comment 
     8 * Common interface for all GUI elements. 
    89 * </p> 
    910 *  
    10  * @version $Revision: $ $Date: $ 
    11  * @author 2011, last modified by $Author: $ 
     11 * @version 1.0 
     12 * @author Patrick Harms 
    1213 */ 
    1314public interface IGUIElement extends IEventTarget { 
    14      
     15 
    1516    /** 
    1617     * <p> 
    17      * TODO comment 
     18     * Returns the specification of the GUI element. 
    1819     * </p> 
     20     *  
     21     * @return the specification 
    1922     */ 
    2023    public IGUIElementSpec getSpecification(); 
     
    2225    /** 
    2326     * <p> 
    24      * TODO comment 
     27     * Returns the parent of the GUI element. 
    2528     * </p> 
     29     *  
     30     * @return the parent 
    2631     */ 
    2732    public IGUIElement getParent(); 
     
    2934    /** 
    3035     * <p> 
    31      * TODO comment 
     36     * Defines that {@link IGUIElement} implementations have to define equals. 
    3237     * </p> 
    33      *   
    34      * @param other 
    35      * @return 
     38     *  
     39     * @see Object#equals(Object) 
    3640     */ 
     41    @Override 
    3742    public boolean equals(Object other); 
    3843 
    3944    /** 
    4045     * <p> 
    41      * TODO comment 
     46     * Defines that {@link IGUIElement} implementations have to define hashCode. 
    4247     * </p> 
     48     *  
     49     * @see Object#hashCode() 
    4350     */ 
     51    @Override 
    4452    public int hashCode(); 
    4553 
    4654    /** 
    4755     * <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. 
    4958     * </p> 
     59     *  
     60     * @param furtherSpec 
     61     *            additional specification 
    5062     */ 
    5163    public void updateSpecification(IGUIElementSpec furtherSpec); 
     
    5365    /** 
    5466     * <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. 
    5669     * </p> 
    57      * 
     70     *  
    5871     * @param guiElement 
     72     *            GUI element that is equal 
    5973     */ 
    6074    public void addEqualGUIElement(IGUIElement equalElement); 
  • trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/IGUIElementFactory.java

    r655 r831  
    33/** 
    44 * <p> 
    5  * TODO comment 
     5 * Common interface for GUI element factories.  
    66 * </p> 
    77 *  
    8  * @version $Revision: $ $Date: 17.08.2012$ 
    9  * @author 2012, last modified by $Author: pharms$ 
     8 * @version 1.0 
     9 * @author Patrick Harms 
    1010 */ 
    1111public interface IGUIElementFactory { 
     
    1313    /** 
    1414     * <p> 
    15      * TODO: comment 
     15     * Instantiates a new {@link IGUIElement} from a given specification. 
    1616     * </p> 
    17      * 
     17     *  
    1818     * @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 
    2025     */ 
    2126    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 
    12package de.ugoe.cs.quest.eventcore.guimodel; 
    23 
     
    56/** 
    67 * <p> 
    7  * TODO comment 
     8 * Common interface for GUI element specifications. 
    89 * </p> 
    910 *  
    10  * @version $Revision: $ $Date: 17.08.2012$ 
    11  * @author 2012, last modified by $Author: pharms$ 
     11 * @version 1.0 
     12 * @author Patrick Harms 
    1213 */ 
    1314public interface IGUIElementSpec extends Serializable { 
     
    1516    /** 
    1617     * <p> 
    17      * TODO: comment 
     18     * Returns a string represenation of the GUI element type that this specification represents. 
    1819     * </p> 
    19      * 
     20     *  
    2021     * @return 
    2122     */ 
    2223    public String getType(); 
    23      
     24 
    2425    /** 
    2526     * <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. 
    2729     * </p> 
    28      * 
     30     *  
    2931     * @param other 
    30      * @return 
     32     *            specification whose similarity to this is evaluated 
     33     * @return true if the specifications are similar; false otherwise 
    3134     */ 
    3235    public boolean getSimilarity(IGUIElementSpec other); 
     
    3437    /** 
    3538     * <p> 
    36      * TODO: comment 
     39     * Defines that {@link IGUIElement} implementations have to define equals. 
    3740     * </p> 
    38      * 
    39      * @param other 
    40      * @return 
     41     *  
     42     * @see Object#equals(Object) 
    4143     */ 
    42     public boolean equals(IGUIElementSpec other); 
    43      
     44    @Override 
     45    public boolean equals(Object other); 
     46 
    4447    /** 
    4548     * <p> 
    46      * TODO: comment 
     49     * Defines that {@link IGUIElement} implementations have to define hashCode. 
    4750     * </p> 
    48      * 
    49      * @return 
     51     *  
     52     * @see Object#hashCode() 
    5053     */ 
     54    @Override 
    5155    public int hashCode(); 
    5256} 
  • trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/IListBox.java

    r748 r831  
    33/** 
    44 * <p> 
    5  * marker interface for GUI elements that represent a list or list box 
     5 * Marker interface for GUI elements that represent a list or list box 
    66 * </p> 
    77 *  
     8 * @version 1.0 
    89 * @author Patrick Harms 
    910 */ 
  • trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/IMenu.java

    r748 r831  
    33/** 
    44 * <p> 
    5  * marker interface for GUI elements that represent a menu 
     5 * Marker interface for GUI elements that represent a menu 
    66 * </p> 
    77 *  
     8 * @version 1.0 
    89 * @author Patrick Harms 
    910 */ 
  • trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/IMenuBar.java

    r748 r831  
    33/** 
    44 * <p> 
    5  * marker interface for GUI elements that represent a menu bar 
     5 * Marker interface for GUI elements that represent a menu bar 
    66 * </p> 
    77 *  
     8 * @version 1.0 
    89 * @author Patrick Harms 
    910 */ 
  • trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/IMenuButton.java

    r748 r831  
    33/** 
    44 * <p> 
    5  * marker interface for GUI elements that represent a button in a menu 
     5 * Marker interface for GUI elements that represent a button in a menu 
    66 * </p> 
    77 *  
     8 * @version 1.0 
    89 * @author Patrick Harms 
    910 */ 
  • trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/IPanel.java

    r748 r831  
    33/** 
    44 * <p> 
    5  * marker interface for GUI elements that represent a panel for structuring GUI content 
     5 * Marker interface for GUI elements that represent a panel for structuring GUI content 
    66 * </p> 
    77 *  
     8 * @version 1.0 
    89 * @author Patrick Harms 
    910 */ 
  • trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/IRadioButton.java

    r748 r831  
    33/** 
    44 * <p> 
    5  * marker interface for GUI elements that represent a radio button 
     5 * Marker interface for GUI elements that represent a radio button 
    66 * </p> 
    77 *  
     8 * @version 1.0 
    89 * @author Patrick Harms 
    910 */ 
  • trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/IScrollBar.java

    r748 r831  
    33/** 
    44 * <p> 
    5  * marker interface for GUI elements that represent a scroll bar of a scroll pane 
     5 * Marker interface for GUI elements that represent a scroll bar of a scroll pane 
    66 * </p> 
    77 *  
     8 * @version 1.0 
    89 * @author Patrick Harms 
    910 */ 
  • trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/IScrollPane.java

    r748 r831  
    33/** 
    44 * <p> 
    5  * marker interface for GUI elements that represent a scroll pane 
     5 * Marker interface for GUI elements that represent a scroll pane 
    66 * </p> 
    77 *  
     8 * @version 1.0 
    89 * @author Patrick Harms 
    910 */ 
  • trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/IShape.java

    r748 r831  
    33/** 
    44 * <p> 
    5  * marker interface for GUI elements that represent any kind of shape not covered by the other 
     5 * Marker interface for GUI elements that represent any kind of shape not covered by the other 
    66 * marker interfaces 
    77 * </p> 
    88 *  
     9 * @version 1.0 
    910 * @author Patrick Harms 
    1011 */ 
  • trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/ISplitPane.java

    r748 r831  
    33/** 
    44 * <p> 
    5  * marker interface for GUI elements that represent a split pane 
     5 * Marker interface for GUI elements that represent a split pane 
    66 * </p> 
    77 *  
     8 * @version 1.0 
    89 * @author Patrick Harms 
    910 */ 
  • trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/ITabbedPane.java

    r748 r831  
    33/** 
    44 * <p> 
    5  * marker interface for GUI elements that represent a tabbed pane 
     5 * Marker interface for GUI elements that represent a tabbed pane 
    66 * </p> 
    77 *  
     8 * @version 1.0 
    89 * @author Patrick Harms 
    910 */ 
  • trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/ITable.java

    r748 r831  
    33/** 
    44 * <p> 
    5  * marker interface for GUI elements that represent a table 
     5 * Marker interface for GUI elements that represent a table 
    66 * </p> 
    77 *  
     8 * @version 1.0 
    89 * @author Patrick Harms 
    910 */ 
  • trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/ITextArea.java

    r748 r831  
    33/** 
    44 * <p> 
    5  * marker interface for GUI elements that represent a multi line text area 
     5 * Marker interface for GUI elements that represent a multi line text area 
    66 * </p> 
    77 *  
     8 * @version 1.0 
    89 * @author Patrick Harms 
    910 */ 
  • trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/ITextField.java

    r748 r831  
    33/** 
    44 * <p> 
    5  * marker interface for GUI elements that represent a single line text field 
     5 * Marker interface for GUI elements that represent a single line text field 
    66 * </p> 
    77 *  
     8 * @version 1.0 
    89 * @author Patrick Harms 
    910 */ 
  • trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/IToolBar.java

    r748 r831  
    33/** 
    44 * <p> 
    5  * marker interface for GUI elements that represent a tool bar 
     5 * Marker interface for GUI elements that represent a tool bar 
    66 * </p> 
    77 *  
     8 * @version 1.0 
    89 * @author Patrick Harms 
    910 */ 
  • trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/ITrackBar.java

    r748 r831  
    33/** 
    44 * <p> 
    5  * marker interface for GUI elements that represent a track bar 
     5 * Marker interface for GUI elements that represent a track bar 
    66 * </p> 
    77 *  
     8 * @version 1.0 
    89 * @author Patrick Harms 
    910 */ 
  • trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/ITree.java

    r748 r831  
    33/** 
    44 * <p> 
    5  * marker interface for GUI elements that represent a tree view 
     5 * Marker interface for GUI elements that represent a tree view 
    66 * </p> 
    77 *  
     8 * @version 1.0 
    89 * @author Patrick Harms 
    910 */ 
Note: See TracChangeset for help on using the changeset viewer.