Ignore:
Timestamp:
09/04/14 16:38:21 (10 years ago)
Author:
dmay
Message:

Implement new command, that generates Jacareto indices. Also, get rid of all previous index hacks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-plugin-jfc/src/main/java/de/ugoe/cs/autoquest/plugin/jfc/guimodel/JFCGUIElementSpec.java

    r1080 r1722  
    7777    /** 
    7878     * <p> 
     79     * An alternative index of the specified GUI element in its parent element. Each element type is 
     80     * counted separately. This index is used for replaying programs such as Jacareto. 
     81     * </p> 
     82     */ 
     83    private int altIndex = -1; 
     84 
     85    /** 
     86     * <p> 
    7987     * Hash code of the GUI element. Used as unique identifier during its existence. 
    8088     * </p> 
     
    8896     */ 
    8997    private List<Integer> formerElementHashes = new ArrayList<Integer>(); 
    90      
     98 
    9199    /** 
    92100     * <p> 
     
    203211        JFCGUIElementSpec otherSpec = (JFCGUIElementSpec) other; 
    204212 
    205         return 
    206             (name == null ? otherSpec.name == null : name.equals(otherSpec.name)) && 
     213        return (name == null ? otherSpec.name == null : name.equals(otherSpec.name)) && 
    207214            (type == null ? otherSpec.type == null : type.equals(otherSpec.type)) && 
    208215            (icon == null ? otherSpec.icon == null : icon.equals(otherSpec.icon)) && 
     
    294301    /** 
    295302     * <p> 
     303     * Returns an alternative index of the specified GUI element in its parent element. Each element 
     304     * type is counted separately. 
     305     * </p> 
     306     *  
     307     * @return the index 
     308     */ 
     309    public int getAltIndex() { 
     310        return altIndex; 
     311    } 
     312 
     313    /** 
     314     * <p> 
    296315     * Returns the object hash of the specified GUI element. 
    297316     * </p> 
     
    301320    public int getElementHash() { 
    302321        return elementHash; 
     322    } 
     323 
     324    /** 
     325     * <p> 
     326     * Sets the alternative index. 
     327     * </p> 
     328     *  
     329     * @param newAltIndex 
     330     *            the index 
     331     */ 
     332    public void setAltIndex(int newAltIndex) { 
     333        altIndex = newAltIndex; 
    303334    } 
    304335 
     
    372403        this.elementHash = newElementHash; 
    373404    } 
    374      
     405 
    375406    /** 
    376407     * <p> 
    377408     * Sets the type hierarchy of the specified GUI element. 
     409     *  
    378410     * @param typeHierarchy 
    379      * </p> 
    380      */ 
    381     public void setTypeHierarchy(List<String> typeHierarchy){ 
    382         this.typeHierarchy = typeHierarchy; 
     411     *            </p> 
     412     */ 
     413    public void setTypeHierarchy(List<String> typeHierarchy) { 
     414        this.typeHierarchy = typeHierarchy; 
    383415    } 
    384416 
     
    423455    @Override 
    424456    public String[] getTypeHierarchy() { 
    425         if (typeHierarchy == null){ 
    426                 return new String[]{(getType())}; 
    427         } 
    428         else 
    429                 return typeHierarchy.toArray(new String[typeHierarchy.size()]); 
     457        if (typeHierarchy == null) { 
     458            return new String[] 
     459                { (getType()) }; 
     460        } 
     461        else 
     462            return typeHierarchy.toArray(new String[typeHierarchy.size()]); 
    430463    } 
    431464 
Note: See TracChangeset for help on using the changeset viewer.