[927] | 1 | // Copyright 2012 Georg-August-Universität Göttingen, Germany |
---|
| 2 | // |
---|
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
---|
| 4 | // you may not use this file except in compliance with the License. |
---|
| 5 | // You may obtain a copy of the License at |
---|
| 6 | // |
---|
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
---|
| 8 | // |
---|
| 9 | // Unless required by applicable law or agreed to in writing, software |
---|
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
---|
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
---|
| 12 | // See the License for the specific language governing permissions and |
---|
| 13 | // limitations under the License. |
---|
[703] | 14 | |
---|
[922] | 15 | package de.ugoe.cs.autoquest.test; |
---|
[703] | 16 | |
---|
[2146] | 17 | import de.ugoe.cs.autoquest.eventcore.IEventTargetSpec; |
---|
[922] | 18 | import de.ugoe.cs.autoquest.eventcore.guimodel.AbstractDefaultGUIElement; |
---|
| 19 | import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement; |
---|
[1876] | 20 | import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIView; |
---|
[703] | 21 | |
---|
| 22 | /** |
---|
| 23 | * TODO comment |
---|
| 24 | * |
---|
| 25 | * @version $Revision: $ $Date: 02.04.2012$ |
---|
| 26 | * @author 2012, last modified by $Author: patrick$ |
---|
| 27 | */ |
---|
| 28 | public class DummyGUIElement extends AbstractDefaultGUIElement implements IGUIElement { |
---|
| 29 | |
---|
| 30 | /** */ |
---|
| 31 | private static final long serialVersionUID = 1L; |
---|
| 32 | |
---|
| 33 | /** */ |
---|
| 34 | private String name; |
---|
| 35 | |
---|
| 36 | /** |
---|
| 37 | * |
---|
| 38 | */ |
---|
| 39 | public DummyGUIElement(String name) { |
---|
[802] | 40 | this(name, null); |
---|
| 41 | } |
---|
| 42 | |
---|
| 43 | /** |
---|
| 44 | * |
---|
| 45 | */ |
---|
| 46 | public DummyGUIElement(String name, IGUIElement parent) { |
---|
| 47 | super(null, parent); |
---|
[703] | 48 | this.name = name; |
---|
| 49 | } |
---|
| 50 | |
---|
| 51 | /* |
---|
| 52 | * (non-Javadoc) |
---|
| 53 | * |
---|
[922] | 54 | * @see de.ugoe.cs.autoquest.eventcore.IEventTarget#getPlatform() |
---|
[703] | 55 | */ |
---|
| 56 | @Override |
---|
| 57 | public String getPlatform() { |
---|
| 58 | return "Dummy"; |
---|
| 59 | } |
---|
| 60 | |
---|
| 61 | /* |
---|
| 62 | * (non-Javadoc) |
---|
| 63 | * |
---|
[922] | 64 | * @see de.ugoe.cs.autoquest.eventcore.IEventTarget#getStringIdentifier() |
---|
[703] | 65 | */ |
---|
| 66 | @Override |
---|
| 67 | public String getStringIdentifier() { |
---|
| 68 | return name; |
---|
| 69 | } |
---|
| 70 | |
---|
| 71 | /* |
---|
| 72 | * (non-Javadoc) |
---|
| 73 | * |
---|
| 74 | * @see java.lang.Object#toString() |
---|
| 75 | */ |
---|
| 76 | @Override |
---|
| 77 | public String toString() { |
---|
| 78 | return name; |
---|
| 79 | } |
---|
| 80 | |
---|
| 81 | /* |
---|
| 82 | * (non-Javadoc) |
---|
| 83 | * |
---|
| 84 | * @see de.harms.attef.userinteraction.GUIElement#equals(GUIElement) |
---|
| 85 | */ |
---|
| 86 | public boolean equals(IGUIElement other) { |
---|
| 87 | return this == other; |
---|
| 88 | } |
---|
| 89 | |
---|
| 90 | @Override |
---|
[2146] | 91 | public void updateSpecification(IEventTargetSpec specToIntegrateElementFor) { |
---|
[703] | 92 | // dummy |
---|
| 93 | } |
---|
| 94 | |
---|
[1876] | 95 | /* (non-Javadoc) |
---|
| 96 | * @see de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement#getView() |
---|
| 97 | */ |
---|
| 98 | @Override |
---|
| 99 | public IGUIView getView() { |
---|
| 100 | return null; |
---|
| 101 | } |
---|
[1490] | 102 | |
---|
| 103 | /* (non-Javadoc) |
---|
| 104 | * @see de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement#getDistanceTo(IGUIElement) |
---|
| 105 | */ |
---|
| 106 | @Override |
---|
| 107 | public double getDistanceTo(IGUIElement otherElement) { |
---|
| 108 | if (this == otherElement) { |
---|
| 109 | return 0.0; |
---|
| 110 | } |
---|
| 111 | else { |
---|
| 112 | return 1.0; |
---|
| 113 | } |
---|
| 114 | } |
---|
[703] | 115 | } |
---|