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