source: trunk/quest-plugin-jfc/src/main/java/de/ugoe/cs/quest/plugin/jfc/guimodel/JFCGUIElement.java @ 589

Last change on this file since 589 was 589, checked in by sherbold, 12 years ago
  • started changing the similarity structure of the GUI model. The equality is now absolute (i.e., boolean instead of an int indicating the degree). Also, lists of equally observed name/hash combinations are now stored. There still seem to be mistakes, however, the structural changes to the interfaces warrant a commit.
  • Property svn:executable set to *
File size: 2.2 KB
Line 
1// Module    : $RCSfile: GUIElementFromReplay.java,v $
2// Version   : $Revision: 0.0 $  $Author: Patrick $  $Date: 27.11.2011 17:18:00 $
3// Project   : TaskTreePerformanceTest
4// Creation  : 2011 by Patrick
5// Copyright : Patrick Harms, 2011
6
7package de.ugoe.cs.quest.plugin.jfc.guimodel;
8
9import de.ugoe.cs.quest.eventcore.guimodel.AbstractDefaultGUIElement;
10import de.ugoe.cs.quest.eventcore.guimodel.IGUIElementSpec;
11
12/**
13 * TODO comment
14 *
15 * @version $Revision: $ $Date: $
16 * @author 2011, last modified by $Author: $
17 */
18public class JFCGUIElement extends AbstractDefaultGUIElement {
19   
20    /**  */
21    private static final long serialVersionUID = 1L;
22
23    /** the specification of the GUI Element */
24    private JFCGUIElementSpec specification;
25
26    /**
27     * @param name
28     * @param id
29     * @param isModal
30     */
31    public JFCGUIElement(JFCGUIElementSpec specification)
32    {
33        super(specification);
34        this.specification = specification;
35    }
36
37    /* (non-Javadoc)
38     * @see de.ugoe.cs.quest.eventcore.IEventTarget#getPlatform()
39     */
40    @Override
41    public String getPlatform() {
42        return "JFC";
43    }
44
45    /**
46     * TODO: comment
47     *
48     * @return
49     */
50    public String getJavaType() {
51        return specification.getType();
52    }
53
54    /**
55     * @return Returns the name.
56     */
57    String getName() {
58        return specification.getName();
59    }
60
61    /**
62     * @return the icon
63     */
64    String getIcon() {
65        return specification.getIcon();
66    }
67
68    /**
69     * @return the index
70     */
71    int getIndex() {
72        return specification.getIndex();
73    }
74
75    /**
76     * @return the hashCode
77     */
78    String getElementHash() {
79        return specification.getElementHash();
80    }
81
82    @Override
83    public void updateSpecification(IGUIElementSpec updateSpecification) {
84        if( updateSpecification instanceof JFCGUIElementSpec ) {
85            specification.setName(((JFCGUIElementSpec) updateSpecification).getName());
86            specification.setElementHash(((JFCGUIElementSpec) updateSpecification).getElementHash());
87        }
88    }
89
90}
Note: See TracBrowser for help on using the repository browser.