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

Last change on this file since 1155 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
RevLine 
[1113]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
[922]15package de.ugoe.cs.autoquest.tasktrees.treeimpl;
[439]16
[922]17import de.ugoe.cs.autoquest.eventcore.IEventTarget;
18import de.ugoe.cs.autoquest.eventcore.IEventType;
19import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
[439]20
21/**
22 * TODO comment
[557]23 *
[439]24 * @version $Revision: $ $Date: $
[557]25 * @author 2011, last modified by $Author: $
[439]26 */
[1146]27class EventTask extends Task implements IEventTask {
[557]28   
[1146]29    /**  */
30    private static final long serialVersionUID = 1L;
31
[557]32    /** */
33    private IEventType eventType;
[439]34
[557]35    /** */
36    private IEventTarget eventTarget;
[439]37
[557]38    /**
39     * @param eventType
40     * @param eventTarget
41     */
42    EventTask(IEventType eventType, IEventTarget eventTarget) {
[1146]43        super.setDescription(eventType.toString() + " executed on " + eventTarget);
[557]44        this.eventType = eventType;
45        this.eventTarget = eventTarget;
46    }
[439]47
[557]48    /**
49     * @return Returns the interaction.
50     */
51    public IEventType getEventType() {
52        return eventType;
53    }
[439]54
[557]55    /**
56     * @return Returns the GUIElement.
57     */
58    public IEventTarget getEventTarget() {
59        return eventTarget;
[439]60    }
[557]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    }
[439]72
73}
Note: See TracBrowser for help on using the repository browser.