Ignore:
Timestamp:
10/30/12 14:02:07 (12 years ago)
Author:
pharms
Message:
  • refined HTML GUI model to also include explicitely the server and the page
File:
1 edited

Legend:

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

    r950 r961  
    1414 
    1515package de.ugoe.cs.autoquest.plugin.html.guimodel; 
    16  
    17 import java.net.URL; 
    1816 
    1917import de.ugoe.cs.autoquest.eventcore.guimodel.AbstractDefaultGUIElement; 
     
    3937    /** 
    4038     * <p> 
    41      * Specification of the GUI Element 
    42      * </p> 
    43      */ 
    44     private HTMLGUIElementSpec specification; 
    45  
    46     /** 
    47      * <p> 
    4839     * Constructor. Creates a new HTMLGUIElement. 
    4940     * </p> 
     
    5748    public HTMLGUIElement(HTMLGUIElementSpec specification, HTMLGUIElement parent) { 
    5849        super(specification, parent); 
    59         this.specification = specification; 
    6050    } 
    6151 
     
    7060    } 
    7161 
    72     /** 
    73      * <p> 
    74      * Returns web page to which this GUI element belongs 
    75      * </p> 
    76      *  
    77      * @return the page URL 
    78      */ 
    79     URL getPageURL() { 
    80         return specification.getPageURL(); 
    81     } 
    82  
    83     /** 
    84      * <p> 
    85      * Returns the title of the page to which the GUI element belongs 
    86      * </p> 
    87      *  
    88      * @return the title 
    89      */ 
    90     String getPageTitle() { 
    91         return specification.getPageTitle(); 
    92     } 
    93  
    94     /** 
    95      * <p> 
    96      * Returns the type of the GUI element, i.e., the name of its tag in HTML 
    97      * </p> 
    98      *  
    99      * @return the tag in HTML 
    100      */ 
    101     String getTagName() { 
    102         return specification.getType(); 
    103     } 
    104  
    105     /** 
    106      * <p> 
    107      * Returns the id of the tag in HTML 
    108      * </p> 
    109      *  
    110      * @return the id of the HTML tag 
    111      */ 
    112     String getTagId() { 
    113         return specification.getTagId(); 
    114     } 
    115  
    116     /** 
    117      * <p> 
    118      * Returns the child index of the tag referring to all tags with the same type within the same 
    119      * parent tag  
    120      * </p> 
    121      *  
    122      * @return the index 
    123      */ 
    124     int getIndex() { 
    125         return specification.getIndex(); 
    126     } 
    127  
    12862    /* 
    12963     * (non-Javadoc) 
     
    13569    @Override 
    13670    public void updateSpecification(IGUIElementSpec updateSpecification) { 
    137         if (updateSpecification instanceof HTMLGUIElementSpec) { 
    138             specification.update(((HTMLGUIElementSpec) updateSpecification)); 
    139         } 
     71        // nothing to do. There is not need for handle things such as name changes, etc. 
    14072    } 
    14173 
     
    15486    } 
    15587 
    156     /* 
    157      * (non-Javadoc) 
    158      *  
    159      * @see java.lang.Object#toString() 
    160      */ 
    161     @Override 
    162     public String toString() { 
    163         String str = getElementDescriptor() + "(" + getTagName(); 
    164         if (getTagId() != null) { 
    165             str += "(id=" + getTagId() + ")"; 
    166         } 
    167         else { 
    168             str += "[" + getIndex() + "]"; 
    169         } 
    170          
    171         str += ")"; 
    172         return str; 
    173     } 
    174  
    17588    /** 
    17689     * <p> 
Note: See TracChangeset for help on using the changeset viewer.