source: trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/EventTask.java @ 1146

Last change on this file since 1146 was 1146, checked in by pharms, 11 years ago
  • complete refactoring of task tree model with a separation of task models and task instances
  • appropriate adaptation of task tree generation process
  • appropriate adaptation of commands and task tree visualization
  • Property svn:executable set to *
File size: 2.0 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.tasktrees.treeimpl;
16
17import de.ugoe.cs.autoquest.eventcore.IEventTarget;
18import de.ugoe.cs.autoquest.eventcore.IEventType;
19import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
20
21/**
22 * TODO comment
23 *
24 * @version $Revision: $ $Date: $
25 * @author 2011, last modified by $Author: $
26 */
27class EventTask extends Task implements IEventTask {
28   
29    /**  */
30    private static final long serialVersionUID = 1L;
31
32    /** */
33    private IEventType eventType;
34
35    /** */
36    private IEventTarget eventTarget;
37
38    /**
39     * @param eventType
40     * @param eventTarget
41     */
42    EventTask(IEventType eventType, IEventTarget eventTarget) {
43        super.setDescription(eventType.toString() + " executed on " + eventTarget);
44        this.eventType = eventType;
45        this.eventTarget = eventTarget;
46    }
47
48    /**
49     * @return Returns the interaction.
50     */
51    public IEventType getEventType() {
52        return eventType;
53    }
54
55    /**
56     * @return Returns the GUIElement.
57     */
58    public IEventTarget getEventTarget() {
59        return eventTarget;
60    }
61
62    /*
63     * (non-Javadoc)
64     *
65     * @see de.harms.tasktrees.TreeNode#clone()
66     */
67    @Override
68    public EventTask clone() {
69        // Event type and target are unchangeable and do not need to be cloned
70        return (EventTask) super.clone();
71    }
72
73}
Note: See TracBrowser for help on using the repository browser.