Ignore:
Timestamp:
02/13/15 10:31:00 (9 years ago)
Author:
pharms
Message:
  • added support for views in GUIs
File:
1 edited

Legend:

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

    r1436 r1876  
    1616 
    1717import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElementSpec; 
     18import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIView; 
    1819 
    1920/** 
     
    2728 * @author Patrick Harms 
    2829 */ 
    29 public class HTMLDocumentSpec extends HTMLGUIElementSpec implements IGUIElementSpec { 
     30public class HTMLDocumentSpec extends HTMLGUIElementSpec implements IGUIElementSpec, IGUIView { 
    3031 
    3132    /** 
     
    123124 
    124125    /* (non-Javadoc) 
     126     * @see java.lang.Object#equals(java.lang.Object) 
     127     */ 
     128    @Override 
     129    public boolean equals(Object obj) { 
     130        if (obj instanceof HTMLDocumentSpec) { 
     131            return getSimilarity((HTMLDocumentSpec) obj); 
     132        } 
     133        else { 
     134            return false; 
     135        } 
     136    } 
     137 
     138    /* (non-Javadoc) 
    125139     * @see java.lang.Object#toString() 
    126140     */ 
    127141    @Override 
    128142    public String toString() { 
    129         return "Document(" + getPath() + ", \"" + getTitle() + "\")"; 
     143        return "Document(" + getPath() + (getQuery() != null ? getQuery() : "") + 
     144            ", \"" + getTitle() + "\")"; 
     145    } 
     146 
     147    /* (non-Javadoc) 
     148     * @see de.ugoe.cs.autoquest.eventcore.guimodel.IGUIView#isModal() 
     149     */ 
     150    @Override 
     151    public boolean isModal() { 
     152        return true; 
    130153    } 
    131154 
     
    148171     * @return the path in the URL of the document 
    149172     */ 
    150     String getPath() { 
     173    public String getPath() { 
    151174        return path; 
    152175    } 
     
    159182     * @return the query in the URL of the document 
    160183     */ 
    161     String getQuery() { 
     184    public String getQuery() { 
    162185        return query; 
    163186    } 
     
    170193     * @return the title of the document 
    171194     */ 
    172     String getTitle() { 
     195    public String getTitle() { 
    173196        return title; 
    174197    } 
Note: See TracChangeset for help on using the changeset viewer.