source: trunk/autoquest-core-events/src/main/java/de/ugoe/cs/autoquest/eventcore/guimodel/IGUIElement.java @ 1010

Last change on this file since 1010 was 1010, checked in by fglaser, 12 years ago
  • new method getUsageObserved() in IGUIElement, implemented in AbstractDefaultGUIElement. AbstractDefaultGUIElement now also

has markAsUsed() method, that sets internal boolean usageObserved to true.

  • JFCSimplifiedLogParser and MFCLogParser were updated and now mark GUI elements that have been targeted during a session as used.
  • Property svn:executable set to *
File size: 2.5 KB
Line 
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
15package de.ugoe.cs.autoquest.eventcore.guimodel;
16
17import 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 */
27public interface IGUIElement extends IEventTarget {
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();
36
37    /**
38     * <p>
39     * Returns the specification of the GUI element.
40     * </p>
41     *
42     * @return the specification
43     */
44    public IGUIElementSpec getSpecification();
45
46    /**
47     * <p>
48     * Returns the parent of the GUI element.
49     * </p>
50     *
51     * @return the parent
52     */
53    public IGUIElement getParent();
54
55    /**
56     * <p>
57     * Defines that {@link IGUIElement} implementations have to define equals.
58     * </p>
59     *
60     * @see Object#equals(Object)
61     */
62    @Override
63    public boolean equals(Object other);
64
65    /**
66     * <p>
67     * Defines that {@link IGUIElement} implementations have to define hashCode.
68     * </p>
69     *
70     * @see Object#hashCode()
71     */
72    @Override
73    public int hashCode();
74
75    /**
76     * <p>
77     * Updates the specification of a GUI element with another specification, e.g., to add further
78     * known names of the GUI element.
79     * </p>
80     *
81     * @param furtherSpec
82     *            additional specification
83     */
84    public void updateSpecification(IGUIElementSpec furtherSpec);
85
86    /**
87     * <p>
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.
90     * </p>
91     *
92     * @param guiElement
93     *            GUI element that is equal
94     */
95    public void addEqualGUIElement(IGUIElement equalElement);
96}
Note: See TracBrowser for help on using the repository browser.