Changeset 1876
- Timestamp:
- 02/13/15 10:31:00 (10 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-events-test/src/test/java/de/ugoe/cs/autoquest/eventcore/guimodel/AbstractDefaultGUIElementTest.java
r1490 r1876 125 125 126 126 /* (non-Javadoc) 127 * @see de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement#getView() 128 */ 129 @Override 130 public IGUIView getView() { 131 return null; 132 } 133 134 /* (non-Javadoc) 127 135 * @see de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement#getDistanceTo(IGUIElement) 128 136 */ -
trunk/autoquest-core-events-test/src/test/java/de/ugoe/cs/autoquest/eventcore/guimodel/GUIModelTest.java
r1490 r1876 1110 1110 1111 1111 /* (non-Javadoc) 1112 * @see de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement#getView() 1113 */ 1114 @Override 1115 public IGUIView getView() { 1116 return null; 1117 } 1118 1119 /* (non-Javadoc) 1112 1120 * @see de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement#getDistanceTo(IGUIElement) 1113 1121 */ -
trunk/autoquest-core-events-test/src/test/java/de/ugoe/cs/autoquest/eventcore/guimodel/MockGUIElement.java
r1490 r1876 61 61 62 62 @Override 63 public IGUIView getView() { 64 return null; 65 } 66 67 @Override 63 68 public double getDistanceTo(IGUIElement otherElement) { 64 69 return 0.0; -
trunk/autoquest-core-events/src/main/java/de/ugoe/cs/autoquest/eventcore/guimodel/GUIElementGroup.java
r1490 r1876 90 90 91 91 /* (non-Javadoc) 92 * @see de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement#getView() 93 */ 94 @Override 95 public IGUIView getView() { 96 return null; 97 } 98 99 /* (non-Javadoc) 92 100 * @see de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement#getDistanceTo(IGUIElement) 93 101 */ -
trunk/autoquest-core-events/src/main/java/de/ugoe/cs/autoquest/eventcore/guimodel/IGUIElement.java
r1490 r1876 44 44 */ 45 45 public IGUIElement getParent(); 46 47 /** 48 * <p> 49 * Returns the view of the GUI to which this GUI element belongs. 50 * </p> 51 * 52 * @return the parent 53 */ 54 public IGUIView getView(); 46 55 47 56 /** -
trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/guimodel/ANDROIDGUIElement.java
r1869 r1876 18 18 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement; 19 19 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElementSpec; 20 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIView; 20 21 21 22 /** … … 71 72 } 72 73 74 /* (non-Javadoc) 75 * @see de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement#getView() 76 */ 77 @Override 78 public IGUIView getView() { 79 throw new UnsupportedOperationException(); 80 } 81 73 82 /* 74 83 * (non-Javadoc) … … 101 110 return "Android"; 102 111 } 103 112 104 113 /** 105 114 * <p> … … 170 179 return str; 171 180 } 172 181 173 182 /* 174 183 * (non-Javadoc) -
trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLDocument.java
r1490 r1876 17 17 import de.ugoe.cs.autoquest.eventcore.guimodel.IDialog; 18 18 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement; 19 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIView; 19 20 20 21 /** … … 68 69 protected String getElementDescriptor() { 69 70 return "Document"; 71 } 72 73 /* (non-Javadoc) 74 * @see de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement#getView() 75 */ 76 @Override 77 public IGUIView getView() { 78 return (HTMLDocumentSpec) this.getSpecification(); 70 79 } 71 80 -
trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLDocumentSpec.java
r1436 r1876 16 16 17 17 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElementSpec; 18 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIView; 18 19 19 20 /** … … 27 28 * @author Patrick Harms 28 29 */ 29 public class HTMLDocumentSpec extends HTMLGUIElementSpec implements IGUIElementSpec {30 public class HTMLDocumentSpec extends HTMLGUIElementSpec implements IGUIElementSpec, IGUIView { 30 31 31 32 /** … … 123 124 124 125 /* (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) 125 139 * @see java.lang.Object#toString() 126 140 */ 127 141 @Override 128 142 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; 130 153 } 131 154 … … 148 171 * @return the path in the URL of the document 149 172 */ 150 String getPath() {173 public String getPath() { 151 174 return path; 152 175 } … … 159 182 * @return the query in the URL of the document 160 183 */ 161 String getQuery() {184 public String getQuery() { 162 185 return query; 163 186 } … … 170 193 * @return the title of the document 171 194 */ 172 String getTitle() {195 public String getTitle() { 173 196 return title; 174 197 } -
trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLPageElement.java
r1496 r1876 16 16 17 17 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement; 18 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIView; 18 19 19 20 /** … … 78 79 public int getIndex() { 79 80 return ((HTMLPageElementSpec) super.getSpecification()).getIndex(); 81 } 82 83 /* (non-Javadoc) 84 * @see de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement#getView() 85 */ 86 @Override 87 public IGUIView getView() { 88 return ((HTMLPageElementSpec) super.getSpecification()).getPage(); 80 89 } 81 90 -
trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLServer.java
r1490 r1876 17 17 import de.ugoe.cs.autoquest.eventcore.guimodel.IFrame; 18 18 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement; 19 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIView; 19 20 20 21 /** … … 88 89 89 90 /* (non-Javadoc) 91 * @see de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement#getView() 92 */ 93 @Override 94 public IGUIView getView() { 95 return null; 96 } 97 98 /* (non-Javadoc) 90 99 * @see de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement#getDistanceTo(IGUIElement) 91 100 */ -
trunk/autoquest-plugin-jfc/src/main/java/de/ugoe/cs/autoquest/plugin/jfc/guimodel/JFCDialog.java
r927 r1876 16 16 17 17 import de.ugoe.cs.autoquest.eventcore.guimodel.IFrame; 18 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIView; 18 19 19 20 /** … … 25 26 * @author Patrick Harms 26 27 */ 27 public class JFCDialog extends JFCGUIElement implements IFrame {28 public class JFCDialog extends JFCGUIElement implements IFrame, IGUIView { 28 29 29 30 /** … … 59 60 } 60 61 62 /* (non-Javadoc) 63 * @see de.ugoe.cs.autoquest.eventcore.guimodel.IGUIView#isModal() 64 */ 65 @Override 66 public boolean isModal() { 67 return true; 68 } 69 61 70 } -
trunk/autoquest-plugin-jfc/src/main/java/de/ugoe/cs/autoquest/plugin/jfc/guimodel/JFCFrame.java
r927 r1876 16 16 17 17 import de.ugoe.cs.autoquest.eventcore.guimodel.IFrame; 18 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIView; 18 19 19 20 /** … … 25 26 * @author Patrick Harms 26 27 */ 27 public class JFCFrame extends JFCGUIElement implements IFrame {28 public class JFCFrame extends JFCGUIElement implements IFrame, IGUIView { 28 29 29 30 /** … … 59 60 } 60 61 62 /* (non-Javadoc) 63 * @see de.ugoe.cs.autoquest.eventcore.guimodel.IGUIView#isModal() 64 */ 65 @Override 66 public boolean isModal() { 67 return false; 68 } 69 61 70 } -
trunk/autoquest-plugin-jfc/src/main/java/de/ugoe/cs/autoquest/plugin/jfc/guimodel/JFCGUIElement.java
r1722 r1876 18 18 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement; 19 19 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElementSpec; 20 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIView; 20 21 21 22 /** … … 186 187 } 187 188 189 /* (non-Javadoc) 190 * @see de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement#getView() 191 */ 192 @Override 193 public IGUIView getView() { 194 IGUIElement element = this; 195 196 while ((element != null) && (!(element instanceof IGUIView))) { 197 if (!(element.getParent() instanceof JFCTabbedPane)) { 198 element = element.getParent(); 199 } 200 else { 201 // break, as all children of a tabbed pane are always views 202 break; 203 } 204 } 205 206 return (IGUIView) element; 207 } 208 188 209 /* 189 210 * (non-Javadoc) -
trunk/autoquest-plugin-mfc/src/main/java/de/ugoe/cs/autoquest/plugin/mfc/guimodel/MFCDialog.java
r927 r1876 16 16 17 17 import de.ugoe.cs.autoquest.eventcore.guimodel.IDialog; 18 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIView; 18 19 19 20 /** … … 25 26 * @author Patrick Harms 26 27 */ 27 public class MFCDialog extends MFCWindow implements IDialog {28 public class MFCDialog extends MFCWindow implements IDialog, IGUIView { 28 29 29 30 /** -
trunk/autoquest-plugin-mfc/src/main/java/de/ugoe/cs/autoquest/plugin/mfc/guimodel/MFCGUIElement.java
r1490 r1876 18 18 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement; 19 19 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElementSpec; 20 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIView; 20 21 21 22 /** … … 153 154 154 155 /* (non-Javadoc) 156 * @see de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement#getView() 157 */ 158 @Override 159 public IGUIView getView() { 160 IGUIElement element = this; 161 162 while ((element != null) && (!(element instanceof IGUIView))) { 163 element = element.getParent(); 164 } 165 166 return (IGUIView) element; 167 } 168 169 /* (non-Javadoc) 155 170 * @see de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement#getDistanceTo(IGUIElement) 156 171 */ -
trunk/autoquest-plugin-mfc/src/main/java/de/ugoe/cs/autoquest/plugin/mfc/guimodel/MFCWindow.java
r927 r1876 16 16 17 17 import de.ugoe.cs.autoquest.eventcore.guimodel.IFrame; 18 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIView; 18 19 19 20 /** … … 25 26 * @author Patrick Harms 26 27 */ 27 public class MFCWindow extends MFCGUIElement implements IFrame {28 public class MFCWindow extends MFCGUIElement implements IFrame, IGUIView { 28 29 29 30 /** -
trunk/autoquest-test-utils/src/main/java/de/ugoe/cs/autoquest/test/DummyGUIElement.java
r1490 r1876 18 18 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement; 19 19 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElementSpec; 20 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIView; 20 21 21 22 /** … … 92 93 } 93 94 95 /* (non-Javadoc) 96 * @see de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement#getView() 97 */ 98 @Override 99 public IGUIView getView() { 100 return null; 101 } 94 102 95 103 /* (non-Javadoc)
Note: See TracChangeset
for help on using the changeset viewer.