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 |
|
---|
7 | package de.ugoe.cs.quest.plugin.jfc.guimodel;
|
---|
8 |
|
---|
9 | import de.ugoe.cs.quest.eventcore.guimodel.AbstractDefaultGUIElement;
|
---|
10 | import 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 | */
|
---|
18 | public 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, JFCGUIElement parent) {
|
---|
32 | super(specification, parent);
|
---|
33 | this.specification = specification;
|
---|
34 | }
|
---|
35 |
|
---|
36 | /* (non-Javadoc)
|
---|
37 | * @see de.ugoe.cs.quest.eventcore.IEventTarget#getPlatform()
|
---|
38 | */
|
---|
39 | @Override
|
---|
40 | public String getPlatform() {
|
---|
41 | return "JFC";
|
---|
42 | }
|
---|
43 |
|
---|
44 | /**
|
---|
45 | * TODO: comment
|
---|
46 | *
|
---|
47 | * @return
|
---|
48 | */
|
---|
49 | public String getJavaType() {
|
---|
50 | return specification.getType();
|
---|
51 | }
|
---|
52 |
|
---|
53 | /**
|
---|
54 | * @return Returns the name.
|
---|
55 | */
|
---|
56 | String getName() {
|
---|
57 | return specification.getName();
|
---|
58 | }
|
---|
59 |
|
---|
60 | /**
|
---|
61 | * @return the icon
|
---|
62 | */
|
---|
63 | String getIcon() {
|
---|
64 | return specification.getIcon();
|
---|
65 | }
|
---|
66 |
|
---|
67 | /**
|
---|
68 | * @return the index
|
---|
69 | */
|
---|
70 | int getIndex() {
|
---|
71 | return specification.getIndex();
|
---|
72 | }
|
---|
73 |
|
---|
74 | /**
|
---|
75 | * @return the hashCode
|
---|
76 | */
|
---|
77 | String getElementHash() {
|
---|
78 | return specification.getElementHash();
|
---|
79 | }
|
---|
80 |
|
---|
81 | /**
|
---|
82 | * <p>
|
---|
83 | * TODO comment
|
---|
84 | * </p>
|
---|
85 | */
|
---|
86 | @Override
|
---|
87 | public void updateSpecification(IGUIElementSpec updateSpecification) {
|
---|
88 | if( updateSpecification instanceof JFCGUIElementSpec ) {
|
---|
89 | specification.setName(((JFCGUIElementSpec) updateSpecification).getName());
|
---|
90 | specification.setElementHash(((JFCGUIElementSpec) updateSpecification).getElementHash());
|
---|
91 | }
|
---|
92 | }
|
---|
93 |
|
---|
94 | }
|
---|