[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.
|
---|
[831] | 14 |
|
---|
[922] | 15 | package de.ugoe.cs.autoquest.eventcore.guimodel;
|
---|
[545] | 16 |
|
---|
[922] | 17 | import de.ugoe.cs.autoquest.eventcore.IEventTarget;
|
---|
[545] | 18 |
|
---|
| 19 | /**
|
---|
[595] | 20 | * <p>
|
---|
[831] | 21 | * Common interface for all GUI elements.
|
---|
[595] | 22 | * </p>
|
---|
[545] | 23 | *
|
---|
[831] | 24 | * @version 1.0
|
---|
| 25 | * @author Patrick Harms
|
---|
[545] | 26 | */
|
---|
| 27 | public interface IGUIElement extends IEventTarget {
|
---|
[1010] | 28 | /**
|
---|
| 29 | * <p>
|
---|
| 30 | * Returns a boolean that indicates if GUIElement was used or not
|
---|
| 31 | * during a session
|
---|
| 32 | * </p>
|
---|
| 33 | * @return
|
---|
| 34 | */
|
---|
| 35 | public boolean getUsageObserved();
|
---|
[831] | 36 |
|
---|
[545] | 37 | /**
|
---|
[595] | 38 | * <p>
|
---|
[831] | 39 | * Returns the specification of the GUI element.
|
---|
[595] | 40 | * </p>
|
---|
[831] | 41 | *
|
---|
| 42 | * @return the specification
|
---|
[545] | 43 | */
|
---|
[576] | 44 | public IGUIElementSpec getSpecification();
|
---|
[545] | 45 |
|
---|
| 46 | /**
|
---|
[595] | 47 | * <p>
|
---|
[831] | 48 | * Returns the parent of the GUI element.
|
---|
[595] | 49 | * </p>
|
---|
[831] | 50 | *
|
---|
| 51 | * @return the parent
|
---|
[603] | 52 | */
|
---|
| 53 | public IGUIElement getParent();
|
---|
| 54 |
|
---|
| 55 | /**
|
---|
| 56 | * <p>
|
---|
[831] | 57 | * Defines that {@link IGUIElement} implementations have to define equals.
|
---|
[603] | 58 | * </p>
|
---|
[831] | 59 | *
|
---|
| 60 | * @see Object#equals(Object)
|
---|
[545] | 61 | */
|
---|
[831] | 62 | @Override
|
---|
[603] | 63 | public boolean equals(Object other);
|
---|
[545] | 64 |
|
---|
[576] | 65 | /**
|
---|
[595] | 66 | * <p>
|
---|
[831] | 67 | * Defines that {@link IGUIElement} implementations have to define hashCode.
|
---|
[595] | 68 | * </p>
|
---|
[831] | 69 | *
|
---|
| 70 | * @see Object#hashCode()
|
---|
[576] | 71 | */
|
---|
[831] | 72 | @Override
|
---|
[576] | 73 | public int hashCode();
|
---|
[589] | 74 |
|
---|
[595] | 75 | /**
|
---|
| 76 | * <p>
|
---|
[831] | 77 | * Updates the specification of a GUI element with another specification, e.g., to add further
|
---|
| 78 | * known names of the GUI element.
|
---|
[595] | 79 | * </p>
|
---|
[831] | 80 | *
|
---|
| 81 | * @param furtherSpec
|
---|
| 82 | * additional specification
|
---|
[595] | 83 | */
|
---|
| 84 | public void updateSpecification(IGUIElementSpec furtherSpec);
|
---|
[613] | 85 |
|
---|
| 86 | /**
|
---|
| 87 | * <p>
|
---|
[831] | 88 | * The {@link IGUIElement} that is passed by this function is equal to the current GUI element
|
---|
| 89 | * and will hereafter be treated as such.
|
---|
[613] | 90 | * </p>
|
---|
[831] | 91 | *
|
---|
[613] | 92 | * @param guiElement
|
---|
[831] | 93 | * GUI element that is equal
|
---|
[613] | 94 | */
|
---|
| 95 | public void addEqualGUIElement(IGUIElement equalElement);
|
---|
[545] | 96 | }
|
---|