Changeset 961 for trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLGUIElement.java
- Timestamp:
- 10/30/12 14:02:07 (12 years ago)
- 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 14 14 15 15 package de.ugoe.cs.autoquest.plugin.html.guimodel; 16 17 import java.net.URL;18 16 19 17 import de.ugoe.cs.autoquest.eventcore.guimodel.AbstractDefaultGUIElement; … … 39 37 /** 40 38 * <p> 41 * Specification of the GUI Element42 * </p>43 */44 private HTMLGUIElementSpec specification;45 46 /**47 * <p>48 39 * Constructor. Creates a new HTMLGUIElement. 49 40 * </p> … … 57 48 public HTMLGUIElement(HTMLGUIElementSpec specification, HTMLGUIElement parent) { 58 49 super(specification, parent); 59 this.specification = specification;60 50 } 61 51 … … 70 60 } 71 61 72 /**73 * <p>74 * Returns web page to which this GUI element belongs75 * </p>76 *77 * @return the page URL78 */79 URL getPageURL() {80 return specification.getPageURL();81 }82 83 /**84 * <p>85 * Returns the title of the page to which the GUI element belongs86 * </p>87 *88 * @return the title89 */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 HTML97 * </p>98 *99 * @return the tag in HTML100 */101 String getTagName() {102 return specification.getType();103 }104 105 /**106 * <p>107 * Returns the id of the tag in HTML108 * </p>109 *110 * @return the id of the HTML tag111 */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 same119 * parent tag120 * </p>121 *122 * @return the index123 */124 int getIndex() {125 return specification.getIndex();126 }127 128 62 /* 129 63 * (non-Javadoc) … … 135 69 @Override 136 70 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. 140 72 } 141 73 … … 154 86 } 155 87 156 /*157 * (non-Javadoc)158 *159 * @see java.lang.Object#toString()160 */161 @Override162 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 175 88 /** 176 89 * <p>
Note: See TracChangeset
for help on using the changeset viewer.