Index: /trunk/autoquest-core-events-patrick/.classpath
===================================================================
--- /trunk/autoquest-core-events-patrick/.classpath	(revision 891)
+++ /trunk/autoquest-core-events-patrick/.classpath	(revision 891)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" output="target/classes" path="src/main/java">
+		<attributes>
+			<attribute name="optional" value="true"/>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="src" output="target/test-classes" path="src/test/java">
+		<attributes>
+			<attribute name="optional" value="true"/>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>
Index: /trunk/autoquest-core-events-patrick/.project
===================================================================
--- /trunk/autoquest-core-events-patrick/.project	(revision 891)
+++ /trunk/autoquest-core-events-patrick/.project	(revision 891)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>quest-core-events-patrick</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.m2e.core.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.m2e.core.maven2Nature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
Index: /trunk/autoquest-core-events-patrick/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- /trunk/autoquest-core-events-patrick/.settings/org.eclipse.jdt.core.prefs	(revision 891)
+++ /trunk/autoquest-core-events-patrick/.settings/org.eclipse.jdt.core.prefs	(revision 891)
@@ -0,0 +1,5 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.6
Index: /trunk/autoquest-core-events-patrick/.settings/org.eclipse.m2e.core.prefs
===================================================================
--- /trunk/autoquest-core-events-patrick/.settings/org.eclipse.m2e.core.prefs	(revision 891)
+++ /trunk/autoquest-core-events-patrick/.settings/org.eclipse.m2e.core.prefs	(revision 891)
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
Index: /trunk/autoquest-core-events-patrick/pom.xml
===================================================================
--- /trunk/autoquest-core-events-patrick/pom.xml	(revision 891)
+++ /trunk/autoquest-core-events-patrick/pom.xml	(revision 891)
@@ -0,0 +1,35 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>de.ugoe.cs.quest</groupId>
+  <artifactId>quest-core-events-patrick</artifactId>
+  <version>0.0.1-SNAPSHOT</version>
+  <name>quest-core-events-patrick</name>
+  <scm>
+    <url>https://quest.informatik.uni-goettingen.de/svn/quest/trunk/quest-core-events-patrick</url>
+  </scm>
+  <dependencies>
+    <dependency>
+      <groupId>de.ugoe.cs.quest</groupId>
+      <artifactId>quest-misc</artifactId>
+      <version>0.0.1-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.8.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>2.3.2</version>
+        <configuration>
+          <source>1.6</source>
+          <target>1.6</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/AbstractDefaultGUIElement.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/AbstractDefaultGUIElement.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/AbstractDefaultGUIElement.java	(revision 891)
@@ -0,0 +1,70 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: AbstractDefaultGUIElement.java,v $
+// Version   : $Revision: 0.0 $  $Author: Patrick $  $Date: 27.11.2011 17:21:28 $
+// Project   : TaskTreePerformanceTest
+// Creation  : 2011 by Patrick
+// Copyright : Patrick Harms, 2011
+//-------------------------------------------------------------------------------------------------
+
+package de.ugoe.cs.quest.eventcore.guimodel;
+
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ *
+ * @version $Revision: $ $Date: $
+ * @author  2011, last modified by $Author: $
+ */
+//-------------------------------------------------------------------------------------------------
+
+public abstract class AbstractDefaultGUIElement implements GUIElement
+{
+  /** the parent interaction element */
+  private GUIElement mParent;
+
+  /** the information about the original type before the mapping */
+  private String mOriginalTypeInfo;
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see GUIElement#setParent(GUIElement)
+   */
+  //-----------------------------------------------------------------------------------------------
+  public void setParent(GUIElement parent)
+  {
+    mParent = parent;
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see GUIElement#getParent()
+   */
+  //-----------------------------------------------------------------------------------------------
+  public GUIElement getParent()
+  {
+    return mParent;
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see de.ugoe.cs.tasktree.guimodel.GUIElement#getOriginalTypeInfo()
+   */
+  //-----------------------------------------------------------------------------------------------
+  @Override
+  public String getOriginalTypeInfo()
+  {
+    return mOriginalTypeInfo;
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see GUIElement#setOriginalTypeInfo(String)
+   */
+  //-----------------------------------------------------------------------------------------------
+  void setOriginalTypeInfo(String originalTypeInfo)
+  {
+    mOriginalTypeInfo = originalTypeInfo;
+  }
+
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/AbstractDefaultGUIElementFactory.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/AbstractDefaultGUIElementFactory.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/AbstractDefaultGUIElementFactory.java	(revision 891)
@@ -0,0 +1,300 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: AbstractDefaultGUIElementFactory.java,v $
+// Version   : $Revision: 0.0 $  $Author: patrick $  $Date: 13.05.2012 $
+// Project   : GUIModel
+// Creation  : 2012 by patrick
+// Copyright : Patrick Harms, 2012
+//-------------------------------------------------------------------------------------------------
+package de.ugoe.cs.quest.eventcore.guimodel;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ * 
+ * @version $Revision: $ $Date: 13.05.2012$
+ * @author 2012, last modified by $Author: patrick$
+ */
+//-------------------------------------------------------------------------------------------------
+public class AbstractDefaultGUIElementFactory
+{
+  /** */
+  private Properties mMappingsFromConfiguration;
+
+  /** */
+  private Map<String, List<GUIElement>> mGuiElementCache = new HashMap<String, List<GUIElement>>();
+  
+  //-----------------------------------------------------------------------------------------------
+  /**
+   * TODO: comment
+   *
+   * @param key
+   * @return
+   */
+  //-----------------------------------------------------------------------------------------------
+  protected List<GUIElement> getGUIElementCandidates(String key)
+  {
+    return mGuiElementCache.get(key);
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /**
+   * TODO: comment
+   *
+   * @param retVal
+   */
+  //-----------------------------------------------------------------------------------------------
+  protected void addGUIElementToCache(String key, GUIElement guiElement)
+  {
+    List<GUIElement> candidates = mGuiElementCache.get(key);
+    
+    if (candidates == null)
+    {
+      candidates = new ArrayList<GUIElement>();
+      mGuiElementCache.put(key, candidates);
+    }
+    
+    candidates.add(guiElement);
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /**
+   * TODO: comment
+   *
+   * @param icon
+   * @param icon2
+   * @return
+   */
+  //-----------------------------------------------------------------------------------------------
+  protected boolean equals(Object object1, Object object2)
+  {
+    if (object1 == object2)
+    {
+      return true;
+    }
+    else if (object1 != null)
+    {
+      return object1.equals(object2);
+    }
+    else
+    {
+      return object2 == null;
+    }
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /**
+   * TODO: comment
+   *
+   * @param name
+   * @return
+   */
+  //-----------------------------------------------------------------------------------------------
+  protected String getKey(String name)
+  {
+    if (name == null)
+    {
+      return "noName";
+    }
+    else
+    {
+      return name;
+    }
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /**
+   * TODO: comment
+   *
+   * @param parameterTypes
+   * @param parameters
+   * @return
+   * @throws GUIModelConfigurationException 
+   */
+  //-----------------------------------------------------------------------------------------------
+  protected GUIElement instantiateGUIElementFromConfiguredMappings(String    type,
+                                                                   Object... parameters)
+    throws GUIModelConfigurationException
+  {
+    Properties mappings = getMappingsFromConfiguration();
+    
+    String className = mappings.getProperty(type);
+    if (className != null)
+    {
+      try
+      {
+        Class<?> clazz = this.getClass().getClassLoader().loadClass(className);
+        
+        if (!GUIElement.class.isAssignableFrom(clazz))
+        {
+          Logger.getLogger(this.getClass().getName()).warning
+            ("configured GUI element representing class " + className + " is no valid GUIElement " +
+             "derivate.");
+          
+          return null;
+        }
+        
+        Class<?>[] parameterTypes = new Class<?>[parameters.length];
+        
+        for (int i = 0; i < parameters.length; i++)
+        {
+          parameterTypes[i] = parameters[i].getClass();
+          
+          if (Boolean.class.equals(parameterTypes[i]))
+          {
+            parameterTypes[i] = boolean.class;
+          }
+          else if (Integer.class.equals(parameterTypes[i]))
+          {
+            parameterTypes[i] = int.class;
+          }
+          else if (Double.class.equals(parameterTypes[i]))
+          {
+            parameterTypes[i] = double.class;
+          }
+          else if (Character.class.equals(parameterTypes[i]))
+          {
+            parameterTypes[i] = char.class;
+          }
+          else if (Byte.class.equals(parameterTypes[i]))
+          {
+            parameterTypes[i] = byte.class;
+          }
+          else if (Float.class.equals(parameterTypes[i]))
+          {
+            parameterTypes[i] = float.class;
+          }
+          else if (Long.class.equals(parameterTypes[i]))
+          {
+            parameterTypes[i] = long.class;
+          }
+          else if (Short.class.equals(parameterTypes[i]))
+          {
+            parameterTypes[i] = short.class;
+          }
+        }
+        
+        GUIElement guiElement =
+          (GUIElement) clazz.getConstructor(parameterTypes).newInstance(parameters);
+        
+        if (guiElement instanceof AbstractDefaultGUIElement)
+        {
+          ((AbstractDefaultGUIElement) guiElement).setOriginalTypeInfo(type);
+        }
+        
+        return guiElement;
+      }
+      catch (ClassNotFoundException e)
+      {
+        Logger.getLogger(this.getClass().getName()).warning
+          ("configured GUI element representing class " + className + " can not be loaded.");
+        throw new GUIModelConfigurationException
+          ("configured GUI element representing class " + className + " can not be loaded.", e);
+      }
+      catch (SecurityException e)
+      {
+        Logger.getLogger(this.getClass().getName()).log
+          (Level.WARNING, "configured GUI element representing class " + className + " can not " +
+           "be instantiated due to security reasons.", e);
+        throw new GUIModelConfigurationException
+          ("configured GUI element representing class " + className + " can not " +
+           "be instantiated due to security reasons.", e);
+      }
+      catch (NoSuchMethodException e)
+      {
+        Logger.getLogger(this.getClass().getName()).warning
+          ("configured GUI element representing class " + className + " does not provide an " +
+           "appropriate constructur.");
+        throw new GUIModelConfigurationException
+          ("configured GUI element representing class " + className + " does not provide an " +
+           "appropriate constructur.", e);
+      }
+      catch (IllegalArgumentException e)
+      {
+        Logger.getLogger(this.getClass().getName()).warning
+          ("configured GUI element representing class " + className + " does not provide an " +
+           "appropriate constructur accepting the provided parameters.");
+        throw new GUIModelConfigurationException
+          ("configured GUI element representing class " + className + " does not provide an " +
+           "appropriate constructur accepting the provided parameters.", e);
+      }
+      catch (InstantiationException e)
+      {
+        Logger.getLogger(this.getClass().getName()).log
+          (Level.WARNING, "configured GUI element representing class " + className + " can not " +
+           "be instantiated.", e);
+        throw new GUIModelConfigurationException
+          ("configured GUI element representing class " + className + " can not " +
+           "be instantiated.", e);
+      }
+      catch (IllegalAccessException e)
+      {
+        Logger.getLogger(this.getClass().getName()).log
+          (Level.WARNING, "configured GUI element representing class " + className + " can not " +
+           "be instantiated.", e);
+        throw new GUIModelConfigurationException
+          ("configured GUI element representing class " + className + " can not " +
+           "be instantiated.", e);
+      }
+      catch (InvocationTargetException e)
+      {
+        Logger.getLogger(this.getClass().getName()).log
+          (Level.WARNING, "configured GUI element representing class " + className + " can not " +
+           "be instantiated.", e);
+        throw new GUIModelConfigurationException
+          ("configured GUI element representing class " + className + " can not " +
+           "be instantiated.", e);
+      }
+    }
+    
+    return null;
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /**
+   * TODO: comment
+   *
+   * @return
+   */
+  //-----------------------------------------------------------------------------------------------
+  private synchronized Properties getMappingsFromConfiguration()
+  {
+    if (mMappingsFromConfiguration != null)
+    {
+      return mMappingsFromConfiguration;
+    }
+    else
+    {
+      mMappingsFromConfiguration = new Properties();
+      
+      InputStream inStream =
+        this.getClass().getClassLoader().getResourceAsStream("GUIElementMapping.txt");
+      
+      if (inStream != null)
+      {
+        try
+        {
+          mMappingsFromConfiguration.load(inStream);
+        }
+        catch (IOException e)
+        {
+          Logger.getLogger(this.getClass().getName()).warning
+            ("could not load GUIElementMapping.txt from classpath, but this may be intended");
+        }
+      }
+      
+      return mMappingsFromConfiguration;
+    }
+  }
+
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/Button.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/Button.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/Button.java	(revision 891)
@@ -0,0 +1,21 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: TrackBar.java,v $
+// Version   : $Revision: 0.0 $  $Author: patrick $  $Date: 28.04.2012 $
+// Project   : GUIModel
+// Creation  : 2012 by patrick
+// Copyright : Patrick Harms, 2012
+//-------------------------------------------------------------------------------------------------
+package de.ugoe.cs.quest.eventcore.guimodel;
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ * 
+ * @version $Revision: $ $Date: 28.04.2012$
+ * @author 2012, last modified by $Author: patrick$
+ */
+//-------------------------------------------------------------------------------------------------
+public interface Button extends GUIElement
+{
+
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/Canvas.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/Canvas.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/Canvas.java	(revision 891)
@@ -0,0 +1,21 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: TrackBar.java,v $
+// Version   : $Revision: 0.0 $  $Author: patrick $  $Date: 28.04.2012 $
+// Project   : GUIModel
+// Creation  : 2012 by patrick
+// Copyright : Patrick Harms, 2012
+//-------------------------------------------------------------------------------------------------
+package de.ugoe.cs.quest.eventcore.guimodel;
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ * 
+ * @version $Revision: $ $Date: 28.04.2012$
+ * @author 2012, last modified by $Author: patrick$
+ */
+//-------------------------------------------------------------------------------------------------
+public interface Canvas extends GUIElement
+{
+
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/Container.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/Container.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/Container.java	(revision 891)
@@ -0,0 +1,36 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: Container.java,v $
+// Version   : $Revision: 0.0 $  $Author: patrick $  $Date: 15.04.2012 $
+// Project   : GUIModel
+// Creation  : 2012 by patrick
+// Copyright : Patrick Harms, 2012
+//-------------------------------------------------------------------------------------------------
+package de.ugoe.cs.quest.eventcore.guimodel;
+
+import java.util.List;
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ * 
+ * @version $Revision: $ $Date: 15.04.2012$
+ * @author 2012, last modified by $Author: patrick$
+ */
+//-------------------------------------------------------------------------------------------------
+public interface Container extends GUIElement
+{
+  //-----------------------------------------------------------------------------------------------
+  /**
+   *
+   */
+  //-----------------------------------------------------------------------------------------------
+  public void addChild(GUIElement child);
+  
+  //-----------------------------------------------------------------------------------------------
+  /**
+   *
+   */
+  //-----------------------------------------------------------------------------------------------
+  public List<GUIElement> getChildren();
+  
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/Dialog.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/Dialog.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/Dialog.java	(revision 891)
@@ -0,0 +1,21 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: TrackBar.java,v $
+// Version   : $Revision: 0.0 $  $Author: patrick $  $Date: 28.04.2012 $
+// Project   : GUIModel
+// Creation  : 2012 by patrick
+// Copyright : Patrick Harms, 2012
+//-------------------------------------------------------------------------------------------------
+package de.ugoe.cs.quest.eventcore.guimodel;
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ * 
+ * @version $Revision: $ $Date: 28.04.2012$
+ * @author 2012, last modified by $Author: patrick$
+ */
+//-------------------------------------------------------------------------------------------------
+public interface Dialog extends GUIElement
+{
+
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/Frame.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/Frame.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/Frame.java	(revision 891)
@@ -0,0 +1,21 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: TrackBar.java,v $
+// Version   : $Revision: 0.0 $  $Author: patrick $  $Date: 28.04.2012 $
+// Project   : GUIModel
+// Creation  : 2012 by patrick
+// Copyright : Patrick Harms, 2012
+//-------------------------------------------------------------------------------------------------
+package de.ugoe.cs.quest.eventcore.guimodel;
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ * 
+ * @version $Revision: $ $Date: 28.04.2012$
+ * @author 2012, last modified by $Author: patrick$
+ */
+//-------------------------------------------------------------------------------------------------
+public interface Frame extends GUIElement
+{
+
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/GUIElement.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/GUIElement.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/GUIElement.java	(revision 891)
@@ -0,0 +1,51 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: GUIElement.java,v $
+// Version   : $Revision: 0.0 $  $Author: Patrick $  $Date: 06.11.2011 10:26:40 $
+// Project   : TaskTreePerformanceTest
+// Creation  : 2011 by Patrick
+// Copyright : Patrick Harms, 2011
+//-------------------------------------------------------------------------------------------------
+
+package de.ugoe.cs.quest.eventcore.guimodel;
+
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ *
+ * @version $Revision: $ $Date: $
+ * @author  2011, last modified by $Author: $
+ */
+//-------------------------------------------------------------------------------------------------
+public interface GUIElement
+{
+  //-----------------------------------------------------------------------------------------------
+  /**
+   *
+   */
+  //-----------------------------------------------------------------------------------------------
+  public void setParent(GUIElement parent);
+  
+  //-----------------------------------------------------------------------------------------------
+  /**
+   *
+   */
+  //-----------------------------------------------------------------------------------------------
+  public GUIElement getParent();
+  
+  //-----------------------------------------------------------------------------------------------
+  /**
+   *
+   */
+  //-----------------------------------------------------------------------------------------------
+  public String getOriginalTypeInfo();
+  
+  //-----------------------------------------------------------------------------------------------
+  /**
+   * @param other
+   * @return
+   */
+  //-----------------------------------------------------------------------------------------------
+  public boolean equals(GUIElement other);
+
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/GUIModelConfigurationException.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/GUIModelConfigurationException.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/GUIModelConfigurationException.java	(revision 891)
@@ -0,0 +1,72 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: GUIModelConfigurationException.java,v $
+// Version   : $Revision: 0.0 $  $Author: patrick $  $Date: 27.05.2012 $
+// Project   : GUIModel
+// Creation  : 2012 by patrick
+// Copyright : Patrick Harms, 2012
+//-------------------------------------------------------------------------------------------------
+package de.ugoe.cs.quest.eventcore.guimodel;
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ * 
+ * @version $Revision: $ $Date: 27.05.2012$
+ * @author 2012, last modified by $Author: patrick$
+ */
+//-------------------------------------------------------------------------------------------------
+public class GUIModelConfigurationException extends Exception
+{
+
+  /**  */
+  private static final long serialVersionUID = 1L;
+
+  //-----------------------------------------------------------------------------------------------
+  /**
+   * TODO: comment
+   *
+   */
+  //-----------------------------------------------------------------------------------------------
+  public GUIModelConfigurationException()
+  {
+    super();
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /**
+   * TODO: comment
+   *
+   * @param message
+   */
+  //-----------------------------------------------------------------------------------------------
+  public GUIModelConfigurationException(String message)
+  {
+    super(message);
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /**
+   * TODO: comment
+   *
+   * @param cause
+   */
+  //-----------------------------------------------------------------------------------------------
+  public GUIModelConfigurationException(Throwable cause)
+  {
+    super(cause);
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /**
+   * TODO: comment
+   *
+   * @param message
+   * @param cause
+   */
+  //-----------------------------------------------------------------------------------------------
+  public GUIModelConfigurationException(String message, Throwable cause)
+  {
+    super(message, cause);
+  }
+
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/Menu.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/Menu.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/Menu.java	(revision 891)
@@ -0,0 +1,21 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: TrackBar.java,v $
+// Version   : $Revision: 0.0 $  $Author: patrick $  $Date: 28.04.2012 $
+// Project   : GUIModel
+// Creation  : 2012 by patrick
+// Copyright : Patrick Harms, 2012
+//-------------------------------------------------------------------------------------------------
+package de.ugoe.cs.quest.eventcore.guimodel;
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ * 
+ * @version $Revision: $ $Date: 28.04.2012$
+ * @author 2012, last modified by $Author: patrick$
+ */
+//-------------------------------------------------------------------------------------------------
+public interface Menu extends GUIElement
+{
+
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/MenuBar.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/MenuBar.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/MenuBar.java	(revision 891)
@@ -0,0 +1,21 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: TrackBar.java,v $
+// Version   : $Revision: 0.0 $  $Author: patrick $  $Date: 28.04.2012 $
+// Project   : GUIModel
+// Creation  : 2012 by patrick
+// Copyright : Patrick Harms, 2012
+//-------------------------------------------------------------------------------------------------
+package de.ugoe.cs.quest.eventcore.guimodel;
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ * 
+ * @version $Revision: $ $Date: 28.04.2012$
+ * @author 2012, last modified by $Author: patrick$
+ */
+//-------------------------------------------------------------------------------------------------
+public interface MenuBar extends Menu
+{
+
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/MenuButton.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/MenuButton.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/MenuButton.java	(revision 891)
@@ -0,0 +1,21 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: TrackBar.java,v $
+// Version   : $Revision: 0.0 $  $Author: patrick $  $Date: 28.04.2012 $
+// Project   : GUIModel
+// Creation  : 2012 by patrick
+// Copyright : Patrick Harms, 2012
+//-------------------------------------------------------------------------------------------------
+package de.ugoe.cs.quest.eventcore.guimodel;
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ * 
+ * @version $Revision: $ $Date: 28.04.2012$
+ * @author 2012, last modified by $Author: patrick$
+ */
+//-------------------------------------------------------------------------------------------------
+public interface MenuButton extends Button
+{
+
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/Panel.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/Panel.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/Panel.java	(revision 891)
@@ -0,0 +1,21 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: TrackBar.java,v $
+// Version   : $Revision: 0.0 $  $Author: patrick $  $Date: 28.04.2012 $
+// Project   : GUIModel
+// Creation  : 2012 by patrick
+// Copyright : Patrick Harms, 2012
+//-------------------------------------------------------------------------------------------------
+package de.ugoe.cs.quest.eventcore.guimodel;
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ * 
+ * @version $Revision: $ $Date: 28.04.2012$
+ * @author 2012, last modified by $Author: patrick$
+ */
+//-------------------------------------------------------------------------------------------------
+public interface Panel extends GUIElement
+{
+
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/ScrollBar.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/ScrollBar.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/ScrollBar.java	(revision 891)
@@ -0,0 +1,21 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: TrackBar.java,v $
+// Version   : $Revision: 0.0 $  $Author: patrick $  $Date: 28.04.2012 $
+// Project   : GUIModel
+// Creation  : 2012 by patrick
+// Copyright : Patrick Harms, 2012
+//-------------------------------------------------------------------------------------------------
+package de.ugoe.cs.quest.eventcore.guimodel;
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ * 
+ * @version $Revision: $ $Date: 28.04.2012$
+ * @author 2012, last modified by $Author: patrick$
+ */
+//-------------------------------------------------------------------------------------------------
+public interface ScrollBar extends GUIElement
+{
+
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/ScrollPane.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/ScrollPane.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/ScrollPane.java	(revision 891)
@@ -0,0 +1,21 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: TrackBar.java,v $
+// Version   : $Revision: 0.0 $  $Author: patrick $  $Date: 28.04.2012 $
+// Project   : GUIModel
+// Creation  : 2012 by patrick
+// Copyright : Patrick Harms, 2012
+//-------------------------------------------------------------------------------------------------
+package de.ugoe.cs.quest.eventcore.guimodel;
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ * 
+ * @version $Revision: $ $Date: 28.04.2012$
+ * @author 2012, last modified by $Author: patrick$
+ */
+//-------------------------------------------------------------------------------------------------
+public interface ScrollPane extends GUIElement
+{
+
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/Shape.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/Shape.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/Shape.java	(revision 891)
@@ -0,0 +1,21 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: TrackBar.java,v $
+// Version   : $Revision: 0.0 $  $Author: patrick $  $Date: 28.04.2012 $
+// Project   : GUIModel
+// Creation  : 2012 by patrick
+// Copyright : Patrick Harms, 2012
+//-------------------------------------------------------------------------------------------------
+package de.ugoe.cs.quest.eventcore.guimodel;
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ * 
+ * @version $Revision: $ $Date: 28.04.2012$
+ * @author 2012, last modified by $Author: patrick$
+ */
+//-------------------------------------------------------------------------------------------------
+public interface Shape extends GUIElement
+{
+
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/SplitPane.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/SplitPane.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/SplitPane.java	(revision 891)
@@ -0,0 +1,21 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: TrackBar.java,v $
+// Version   : $Revision: 0.0 $  $Author: patrick $  $Date: 28.04.2012 $
+// Project   : GUIModel
+// Creation  : 2012 by patrick
+// Copyright : Patrick Harms, 2012
+//-------------------------------------------------------------------------------------------------
+package de.ugoe.cs.quest.eventcore.guimodel;
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ * 
+ * @version $Revision: $ $Date: 28.04.2012$
+ * @author 2012, last modified by $Author: patrick$
+ */
+//-------------------------------------------------------------------------------------------------
+public interface SplitPane extends GUIElement
+{
+
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/TabbedPane.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/TabbedPane.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/TabbedPane.java	(revision 891)
@@ -0,0 +1,21 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: TrackBar.java,v $
+// Version   : $Revision: 0.0 $  $Author: patrick $  $Date: 28.04.2012 $
+// Project   : GUIModel
+// Creation  : 2012 by patrick
+// Copyright : Patrick Harms, 2012
+//-------------------------------------------------------------------------------------------------
+package de.ugoe.cs.quest.eventcore.guimodel;
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ * 
+ * @version $Revision: $ $Date: 28.04.2012$
+ * @author 2012, last modified by $Author: patrick$
+ */
+//-------------------------------------------------------------------------------------------------
+public interface TabbedPane extends GUIElement
+{
+
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/TextArea.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/TextArea.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/TextArea.java	(revision 891)
@@ -0,0 +1,21 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: TrackBar.java,v $
+// Version   : $Revision: 0.0 $  $Author: patrick $  $Date: 28.04.2012 $
+// Project   : GUIModel
+// Creation  : 2012 by patrick
+// Copyright : Patrick Harms, 2012
+//-------------------------------------------------------------------------------------------------
+package de.ugoe.cs.quest.eventcore.guimodel;
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ * 
+ * @version $Revision: $ $Date: 28.04.2012$
+ * @author 2012, last modified by $Author: patrick$
+ */
+//-------------------------------------------------------------------------------------------------
+public interface TextArea extends GUIElement
+{
+
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/TextField.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/TextField.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/TextField.java	(revision 891)
@@ -0,0 +1,21 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: TrackBar.java,v $
+// Version   : $Revision: 0.0 $  $Author: patrick $  $Date: 28.04.2012 $
+// Project   : GUIModel
+// Creation  : 2012 by patrick
+// Copyright : Patrick Harms, 2012
+//-------------------------------------------------------------------------------------------------
+package de.ugoe.cs.quest.eventcore.guimodel;
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ * 
+ * @version $Revision: $ $Date: 28.04.2012$
+ * @author 2012, last modified by $Author: patrick$
+ */
+//-------------------------------------------------------------------------------------------------
+public interface TextField extends GUIElement
+{
+
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/ToolBar.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/ToolBar.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/ToolBar.java	(revision 891)
@@ -0,0 +1,21 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: TrackBar.java,v $
+// Version   : $Revision: 0.0 $  $Author: patrick $  $Date: 28.04.2012 $
+// Project   : GUIModel
+// Creation  : 2012 by patrick
+// Copyright : Patrick Harms, 2012
+//-------------------------------------------------------------------------------------------------
+package de.ugoe.cs.quest.eventcore.guimodel;
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ * 
+ * @version $Revision: $ $Date: 28.04.2012$
+ * @author 2012, last modified by $Author: patrick$
+ */
+//-------------------------------------------------------------------------------------------------
+public interface ToolBar extends GUIElement
+{
+
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/TrackBar.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/TrackBar.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/TrackBar.java	(revision 891)
@@ -0,0 +1,21 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: TrackBar.java,v $
+// Version   : $Revision: 0.0 $  $Author: patrick $  $Date: 28.04.2012 $
+// Project   : GUIModel
+// Creation  : 2012 by patrick
+// Copyright : Patrick Harms, 2012
+//-------------------------------------------------------------------------------------------------
+package de.ugoe.cs.quest.eventcore.guimodel;
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ * 
+ * @version $Revision: $ $Date: 28.04.2012$
+ * @author 2012, last modified by $Author: patrick$
+ */
+//-------------------------------------------------------------------------------------------------
+public interface TrackBar extends GUIElement
+{
+
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/Interaction.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/Interaction.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/Interaction.java	(revision 891)
@@ -0,0 +1,43 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: Interaction.java,v $
+// Version   : $Revision: 0.0 $  $Author: Patrick $  $Date: 06.11.2011 10:26:33 $
+// Project   : TaskTreePerformanceTest
+// Creation  : 2011 by Patrick
+// Copyright : Patrick Harms, 2011
+//-------------------------------------------------------------------------------------------------
+
+package de.ugoe.cs.quest.eventcore.userinteraction;
+
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ *
+ * @version $Revision: $ $Date: $
+ * @author  2011, last modified by $Author: $
+ */
+//-------------------------------------------------------------------------------------------------
+public interface Interaction
+{
+  //-----------------------------------------------------------------------------------------------
+  /**
+   * @return
+   */
+  //-----------------------------------------------------------------------------------------------
+  public String getName();
+
+  //-----------------------------------------------------------------------------------------------
+  /**
+   * @return
+   */
+  //-----------------------------------------------------------------------------------------------
+  public boolean startsLogicalSequence();
+
+  //-----------------------------------------------------------------------------------------------
+  /**
+   * @return
+   */
+  //-----------------------------------------------------------------------------------------------
+  public boolean finishesLogicalSequence();
+
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/InteractionEvent.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/InteractionEvent.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/InteractionEvent.java	(revision 891)
@@ -0,0 +1,73 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: InteractionEvent.java,v $
+// Version   : $Revision: 0.0 $  $Author: Patrick $  $Date: 06.11.2011 10:48:01 $
+// Project   : TaskTreePerformanceTest
+// Creation  : 2011 by Patrick
+// Copyright : Patrick Harms, 2011
+//-------------------------------------------------------------------------------------------------
+
+package de.ugoe.cs.quest.eventcore.userinteraction;
+
+import de.ugoe.cs.quest.eventcore.guimodel.GUIElement;
+
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ *
+ * @version $Revision: $ $Date: $
+ * @author  2011, last modified by $Author: $
+ */
+//-------------------------------------------------------------------------------------------------
+public class InteractionEvent
+{
+  /** */
+  private GUIElement mGUIElement;
+  
+  /** */
+  private Interaction mInteraction;
+
+  //-----------------------------------------------------------------------------------------------
+  /**
+   * @param GUIElement
+   * @param interaction
+   */
+  //-----------------------------------------------------------------------------------------------
+  public InteractionEvent(GUIElement guiElement, Interaction interaction)
+  {
+    mGUIElement = guiElement;
+    mInteraction = interaction;
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /**
+   * @return
+   */
+  //-----------------------------------------------------------------------------------------------
+  public GUIElement getGUIElement()
+  {
+    return mGUIElement;
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /**
+   * @return
+   */
+  //-----------------------------------------------------------------------------------------------
+  public Interaction getInteraction()
+  {
+    return mInteraction;
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see java.lang.Object#toString()
+   */
+  //-----------------------------------------------------------------------------------------------
+  @Override
+  public String toString()
+  {
+    return mInteraction + " on " + mGUIElement;
+  }
+
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/InteractionEventList.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/InteractionEventList.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/InteractionEventList.java	(revision 891)
@@ -0,0 +1,279 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: InteractionEventList.java,v $
+// Version   : $Revision: 0.0 $  $Author: Patrick $  $Date: 04.12.2011 10:20:14 $
+// Project   : TaskTreePerformanceTest
+// Creation  : 2011 by Patrick
+// Copyright : Patrick Harms, 2011
+//-------------------------------------------------------------------------------------------------
+
+package de.ugoe.cs.quest.eventcore.userinteraction;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ *
+ * @version $Revision: $ $Date: $
+ * @author  2011, last modified by $Author: $
+ */
+//-------------------------------------------------------------------------------------------------
+@SuppressWarnings("serial")
+public class InteractionEventList
+  extends ArrayList<InteractionEvent>
+  implements List<InteractionEvent>
+{
+  /** stores the events to be handled later in the order, they should be processed */
+  private List<KeyEventPair> mEventPairs = new ArrayList<KeyEventPair>();
+  
+  //-----------------------------------------------------------------------------------------------
+  /**
+   * this method sorts interaction events for pressed keys. The reason is, that sometimes the
+   * release of one key comes after the pressing of the succeeding key. This only makes sense
+   * for shift, ctrl or alt keys, but not for usual characters. So the events are sorted.<br/>
+   * Furthermore, this methods creates key released events in the specific case, where a key is
+   * pressed for a long time. Here, many subsequent key pressed events for the same key can be
+   * observed, for which there are no key released events.
+   */
+  //-----------------------------------------------------------------------------------------------
+  @Override
+  public boolean add(InteractionEvent event)
+  {
+    if (event.getInteraction() instanceof KeyInteraction)
+    {
+      for (int i = 0; i < mEventPairs.size(); i++)
+      {
+        KeyEventPair eventPair = mEventPairs.get(i);
+        
+        if (eventPair.process(event))
+        {
+          // handle all leading and completed event pairs, if any
+          while ((mEventPairs.size() > 0) && (mEventPairs.get(0).isComplete()))
+          {
+            addEventPair(mEventPairs.get(0));
+            mEventPairs.remove(0);
+          }
+          return true;
+        }
+      }
+      
+      mEventPairs.add(new KeyEventPair(event));
+      return true;
+    }
+    else
+    {
+      // any other event is simply added
+      return super.add(event);
+    }
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see java.util.ArrayList#add(int, java.lang.Object)
+   */
+  //-----------------------------------------------------------------------------------------------
+  @Override
+  public void add(int index, InteractionEvent event)
+  {
+    List<InteractionEvent> remaining = new ArrayList<InteractionEvent>();
+    
+    while (index < super.size())
+    {
+      remaining.add(super.remove(index));
+    }
+    
+    add(event);
+    addAll(remaining);
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see java.util.ArrayList#addAll(java.util.Collection)
+   */
+  //-----------------------------------------------------------------------------------------------
+  @Override
+  public boolean addAll(Collection<? extends InteractionEvent> events)
+  {
+    int initialSize = super.size();
+    
+    for (InteractionEvent event : events)
+    {
+      add(event);
+    }
+    
+    return initialSize != super.size();
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see java.util.ArrayList#addAll(int, java.util.Collection)
+   */
+  //-----------------------------------------------------------------------------------------------
+  @Override
+  public boolean addAll(int index, Collection<? extends InteractionEvent> events)
+  {
+    int initialSize = super.size();
+    
+    List<InteractionEvent> remaining = new ArrayList<InteractionEvent>();
+    
+    while (index < super.size())
+    {
+      remaining.add(super.remove(index));
+    }
+    
+    addAll(events);
+    addAll(remaining);
+    
+    return initialSize != super.size();
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /**
+   *
+   */
+  //-----------------------------------------------------------------------------------------------
+  private void addEventPair(KeyEventPair eventPair)
+  {
+    super.add(eventPair.mFirst);
+    
+    for (KeyEventPair child : eventPair.mChildren)
+    {
+      addEventPair(child);
+    }
+    
+    super.add(eventPair.mSecond);
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /**
+   *
+   */
+  //-----------------------------------------------------------------------------------------------
+  private static class KeyEventPair
+  {
+    /** the first interaction event */
+    private InteractionEvent mFirst;
+    
+    /** the second interaction event */
+    private InteractionEvent mSecond;
+
+    /** the children, this event pair may have */
+    private List<KeyEventPair> mChildren = new ArrayList<KeyEventPair>();
+    
+    //---------------------------------------------------------------------------------------------
+    /**
+     *
+     */
+    //---------------------------------------------------------------------------------------------
+    private KeyEventPair(InteractionEvent first)
+    {
+      if (!(first.getInteraction() instanceof KeyPressed))
+      {
+        throw new IllegalArgumentException
+          ("can only handle key pressed interaction events as first element of an event pair");
+      }
+      mFirst = first;
+    }
+    
+    //---------------------------------------------------------------------------------------------
+    /**
+     * sorts the event as the second of the pair or as the closing of this. Returns true,
+     * if this matched, false else
+     */
+    //---------------------------------------------------------------------------------------------
+    private boolean process(InteractionEvent event)
+    {
+      if (!(event.getInteraction() instanceof KeyInteraction))
+      {
+        throw new IllegalArgumentException("can only handle key interaction events");
+      }
+      
+      if (this.isComplete())
+      {
+        // do not process events, if there are no more events expected
+        return false;
+      }
+      
+      if ((event.getInteraction() instanceof KeyReleased) &&
+          (((KeyInteraction) mFirst.getInteraction()).getKey() ==
+           ((KeyInteraction) event.getInteraction()).getKey()) &&
+          (mSecond == null))
+      {
+        // this is the release of the represented key. Store it and notify the processing.
+        mSecond = event;
+        return true;
+      }
+      else if ((event.getInteraction() instanceof KeyPressed) &&
+               (((KeyInteraction) mFirst.getInteraction()).getKey() ==
+                ((KeyInteraction) event.getInteraction()).getKey()) &&
+               (mSecond == null))
+      {
+        // the key was pressed before it was released again. This happens, if the key
+        // stays pressed for a long time. Generate a key released event but do not mark
+        // the new event as processed
+        mSecond = new InteractionEvent
+          (mFirst.getGUIElement(),
+           new KeyReleased(((KeyInteraction) event.getInteraction()).getKey()));
+        return false;
+      }
+      else if (((KeyInteraction) mFirst.getInteraction()).getKey().isCombinationKey() &&
+               (((KeyInteraction) mFirst.getInteraction()).getKey() !=
+                ((KeyInteraction) event.getInteraction()).getKey()))
+      {
+        // this pair may have children. Let the event be processed by the children. If this
+        // doesn't work, add the event as a new child pair, if it is a new key pressed
+        
+        for (KeyEventPair child : mChildren)
+        {
+          if (child.process(event))
+          {
+            return true;
+          }
+        }
+        
+        if (event.getInteraction() instanceof KeyPressed)
+        {
+          mChildren.add(new KeyEventPair(event));
+          return true;
+        }
+        else
+        {
+          return false;
+        }
+      }
+      else
+      {
+        // this pair may not have children
+        return false;
+      }
+    }
+    
+    //---------------------------------------------------------------------------------------------
+    /**
+     * @return
+     */
+    //---------------------------------------------------------------------------------------------
+    private boolean isComplete()
+    {
+      if ((mFirst != null) && (mSecond != null))
+      {
+        for (KeyEventPair child : mChildren)
+        {
+          if (!child.isComplete())
+          {
+            return false;
+          }
+        }
+        
+        return true;
+      }
+      else
+      {
+        return false;
+      }
+    }
+
+  }
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/KeyInteraction.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/KeyInteraction.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/KeyInteraction.java	(revision 891)
@@ -0,0 +1,47 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: Click.java,v $
+// Version   : $Revision: 0.0 $  $Author: Patrick $  $Date: 06.11.2011 10:28:39 $
+// Project   : TaskTreePerformanceTest
+// Creation  : 2011 by Patrick
+// Copyright : Patrick Harms, 2011
+//-------------------------------------------------------------------------------------------------
+
+package de.ugoe.cs.quest.eventcore.userinteraction;
+
+import de.ugoe.cs.tasktree.keyboardmaps.VirtualKey;
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ *
+ * @version $Revision: $ $Date: $
+ * @author  2011, last modified by $Author: $
+ */
+//-------------------------------------------------------------------------------------------------
+public abstract class KeyInteraction implements Interaction
+{
+  /** the key, that was actually pressed */
+  private VirtualKey mKey;
+
+  //-----------------------------------------------------------------------------------------------
+  /**
+   * @param key
+   */
+  //-----------------------------------------------------------------------------------------------
+  public KeyInteraction(VirtualKey key)
+  {
+    super();
+    mKey = key;
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /**
+   * 
+   */
+  //-----------------------------------------------------------------------------------------------
+  public VirtualKey getKey()
+  {
+    return mKey;
+  }
+
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/KeyPressed.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/KeyPressed.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/KeyPressed.java	(revision 891)
@@ -0,0 +1,94 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: Click.java,v $
+// Version   : $Revision: 0.0 $  $Author: Patrick $  $Date: 06.11.2011 10:28:39 $
+// Project   : TaskTreePerformanceTest
+// Creation  : 2011 by Patrick
+// Copyright : Patrick Harms, 2011
+//-------------------------------------------------------------------------------------------------
+
+package de.ugoe.cs.quest.eventcore.userinteraction;
+
+import de.ugoe.cs.tasktree.keyboardmaps.VirtualKey;
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ *
+ * @version $Revision: $ $Date: $
+ * @author  2011, last modified by $Author: $
+ */
+//-------------------------------------------------------------------------------------------------
+public class KeyPressed extends KeyInteraction
+{
+  //-----------------------------------------------------------------------------------------------
+  /**
+   * @param key
+   */
+  //-----------------------------------------------------------------------------------------------
+  public KeyPressed(VirtualKey key)
+  {
+    super(key);
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see de.harms.attef.userinteraction.Interaction#getName()
+   */
+  //-----------------------------------------------------------------------------------------------
+  public String getName()
+  {
+    return "KeyPressed " + super.getKey();
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see java.lang.Object#toString()
+   */
+  //-----------------------------------------------------------------------------------------------
+  @Override
+  public String toString()
+  {
+    return "pressing key " + super.getKey();
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see de.harms.attef.userinteraction.Interaction#startsLogicalSequence()
+   */
+  //-----------------------------------------------------------------------------------------------
+  public boolean startsLogicalSequence()
+  {
+    // TODO handle lock keys correctly
+    return super.getKey().isCombinationKey();
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see de.harms.attef.userinteraction.Interaction#finishesLogicalSequence()
+   */
+  //-----------------------------------------------------------------------------------------------
+  public boolean finishesLogicalSequence()
+  {
+    // TODO Auto-generated method stub
+    return false;
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see java.lang.Object#equals(java.lang.Object)
+   */
+  //-----------------------------------------------------------------------------------------------
+  @Override
+  public boolean equals(Object other)
+  {
+    if (other instanceof KeyPressed)
+    {
+      return (super.getKey() == ((KeyPressed) other).getKey());
+    }
+    else
+    {
+      return false;
+    }
+  }
+
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/KeyReleased.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/KeyReleased.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/KeyReleased.java	(revision 891)
@@ -0,0 +1,94 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: Click.java,v $
+// Version   : $Revision: 0.0 $  $Author: Patrick $  $Date: 06.11.2011 10:28:39 $
+// Project   : TaskTreePerformanceTest
+// Creation  : 2011 by Patrick
+// Copyright : Patrick Harms, 2011
+//-------------------------------------------------------------------------------------------------
+
+package de.ugoe.cs.quest.eventcore.userinteraction;
+
+import de.ugoe.cs.tasktree.keyboardmaps.VirtualKey;
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ *
+ * @version $Revision: $ $Date: $
+ * @author  2011, last modified by $Author: $
+ */
+//-------------------------------------------------------------------------------------------------
+public class KeyReleased extends KeyInteraction
+{
+  //-----------------------------------------------------------------------------------------------
+  /**
+   * @param key
+   */
+  //-----------------------------------------------------------------------------------------------
+  public KeyReleased(VirtualKey key)
+  {
+    super(key);
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see de.harms.attef.userinteraction.Interaction#getName()
+   */
+  //-----------------------------------------------------------------------------------------------
+  public String getName()
+  {
+    return "KeyReleased " + super.getKey();
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see java.lang.Object#toString()
+   */
+  //-----------------------------------------------------------------------------------------------
+  @Override
+  public String toString()
+  {
+    return "releasing key " + super.getKey();
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see de.harms.attef.userinteraction.Interaction#startsLogicalSequence()
+   */
+  //-----------------------------------------------------------------------------------------------
+  public boolean startsLogicalSequence()
+  {
+    // TODO Auto-generated method stub
+    return false;
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see de.harms.attef.userinteraction.Interaction#finishesLogicalSequence()
+   */
+  //-----------------------------------------------------------------------------------------------
+  public boolean finishesLogicalSequence()
+  {
+    //TODO handle lock keys correctly
+    return super.getKey().isCombinationKey();
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see java.lang.Object#equals(java.lang.Object)
+   */
+  //-----------------------------------------------------------------------------------------------
+  @Override
+  public boolean equals(Object other)
+  {
+    if (other instanceof KeyReleased)
+    {
+      return (super.getKey() == ((KeyReleased) other).getKey());
+    }
+    else
+    {
+      return false;
+    }
+  }
+
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/KeyboardFocusChange.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/KeyboardFocusChange.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/KeyboardFocusChange.java	(revision 891)
@@ -0,0 +1,65 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: FocusChange.java,v $
+// Version   : $Revision: 0.0 $  $Author: Patrick $  $Date: 27.11.2011 18:11:29 $
+// Project   : TaskTreePerformanceTest
+// Creation  : 2011 by Patrick
+// Copyright : Patrick Harms, 2011
+//-------------------------------------------------------------------------------------------------
+
+package de.ugoe.cs.quest.eventcore.userinteraction;
+
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ *
+ * @version $Revision: $ $Date: $
+ * @author  2011, last modified by $Author: $
+ */
+//-------------------------------------------------------------------------------------------------
+
+public class KeyboardFocusChange implements Interaction
+{
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see de.harms.attef.userinteraction.Interaction#getName()
+   */
+  //-----------------------------------------------------------------------------------------------
+  public String getName()
+  {
+    return "KeyboardFocusChanged";
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see de.ugoe.cs.tasktree.userinteraction.Interaction#startsLogicalSequence()
+   */
+  //-----------------------------------------------------------------------------------------------
+  @Override
+  public boolean startsLogicalSequence()
+  {
+    return true;
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see de.ugoe.cs.tasktree.userinteraction.Interaction#finishesLogicalSequence()
+   */
+  //-----------------------------------------------------------------------------------------------
+  @Override
+  public boolean finishesLogicalSequence()
+  {
+    return true;
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see java.lang.Object#toString()
+   */
+  //-----------------------------------------------------------------------------------------------
+  @Override
+  public String toString()
+  {
+    return "keyboard focus changed";
+  }
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/MouseButtonDown.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/MouseButtonDown.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/MouseButtonDown.java	(revision 891)
@@ -0,0 +1,104 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: Click.java,v $
+// Version   : $Revision: 0.0 $  $Author: Patrick $  $Date: 06.11.2011 10:28:39 $
+// Project   : TaskTreePerformanceTest
+// Creation  : 2011 by Patrick
+// Copyright : Patrick Harms, 2011
+//-------------------------------------------------------------------------------------------------
+
+package de.ugoe.cs.quest.eventcore.userinteraction;
+
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ *
+ * @version $Revision: $ $Date: $
+ * @author  2011, last modified by $Author: $
+ */
+//-------------------------------------------------------------------------------------------------
+public class MouseButtonDown extends MouseButtonInteraction
+{
+
+  //-----------------------------------------------------------------------------------------------
+  /**
+   * @param button
+   */
+  //-----------------------------------------------------------------------------------------------
+  public MouseButtonDown(Button button)
+  {
+    super(button);
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see de.harms.attef.userinteraction.Interaction#getName()
+   */
+  //-----------------------------------------------------------------------------------------------
+  public String getName()
+  {
+    if (super.getButton() == Button.LEFT)
+    {
+      return "LeftMouseButtonDown";
+    }
+    else if (super.getButton() == Button.MIDDLE)
+    {
+      return "MiddleMouseButtonDown";
+    }
+    else if (super.getButton() == Button.RIGHT)
+    {
+      return "RightMouseButtonDown";
+    }
+    else
+    {
+      return "UnknownMouseButtonDown";
+    }
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see java.lang.Object#toString()
+   */
+  //-----------------------------------------------------------------------------------------------
+  @Override
+  public String toString()
+  {
+    if (super.getButton() == Button.LEFT)
+    {
+      return "left mouse button down";
+    }
+    else if (super.getButton() == Button.MIDDLE)
+    {
+      return "middle mouse button down";
+    }
+    else if (super.getButton() == Button.RIGHT)
+    {
+      return "right mouse button down";
+    }
+    else
+    {
+      return "unknown mouse button down";
+    }
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see de.harms.attef.userinteraction.Interaction#startsLogicalSequence()
+   */
+  //-----------------------------------------------------------------------------------------------
+  public boolean startsLogicalSequence()
+  {
+    return true;
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see de.harms.attef.userinteraction.Interaction#finishesLogicalSequence()
+   */
+  //-----------------------------------------------------------------------------------------------
+  public boolean finishesLogicalSequence()
+  {
+    return false;
+  }
+
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/MouseButtonInteraction.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/MouseButtonInteraction.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/MouseButtonInteraction.java	(revision 891)
@@ -0,0 +1,54 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: MouseButtonInteraction.java,v $
+// Version   : $Revision: 0.0 $  $Author: Patrick $  $Date: 18.12.2011 10:06:29 $
+// Project   : TaskTreePerformanceTest
+// Creation  : 2011 by Patrick
+// Copyright : Patrick Harms, 2011
+//-------------------------------------------------------------------------------------------------
+
+package de.ugoe.cs.quest.eventcore.userinteraction;
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ *
+ * @version $Revision: $ $Date: $
+ * @author  2011, last modified by $Author: $
+ */
+//-------------------------------------------------------------------------------------------------
+
+public abstract class MouseButtonInteraction extends MouseInteraction
+{
+
+  /** */
+  public static enum Button
+  {
+    LEFT,
+    MIDDLE,
+    RIGHT;
+  }
+
+  /** the button used for mouse interaction */
+  private Button mButton;
+
+  //-----------------------------------------------------------------------------------------------
+  /**
+   * 
+   */
+  //-----------------------------------------------------------------------------------------------
+  public MouseButtonInteraction(Button button)
+  {
+    mButton = button;
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /**
+   * @return Returns the button.
+   */
+  //-----------------------------------------------------------------------------------------------
+  public Button getButton()
+  {
+    return mButton;
+  }
+
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/MouseButtonUp.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/MouseButtonUp.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/MouseButtonUp.java	(revision 891)
@@ -0,0 +1,104 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: Click.java,v $
+// Version   : $Revision: 0.0 $  $Author: Patrick $  $Date: 06.11.2011 10:28:39 $
+// Project   : TaskTreePerformanceTest
+// Creation  : 2011 by Patrick
+// Copyright : Patrick Harms, 2011
+//-------------------------------------------------------------------------------------------------
+
+package de.ugoe.cs.quest.eventcore.userinteraction;
+
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ *
+ * @version $Revision: $ $Date: $
+ * @author  2011, last modified by $Author: $
+ */
+//-------------------------------------------------------------------------------------------------
+public class MouseButtonUp extends MouseButtonInteraction
+{
+
+  //-----------------------------------------------------------------------------------------------
+  /**
+   * @param button
+   */
+  //-----------------------------------------------------------------------------------------------
+  public MouseButtonUp(Button button)
+  {
+    super(button);
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see de.harms.attef.userinteraction.Interaction#getName()
+   */
+  //-----------------------------------------------------------------------------------------------
+  public String getName()
+  {
+    if (super.getButton() == Button.LEFT)
+    {
+      return "LeftMouseButtonUp";
+    }
+    else if (super.getButton() == Button.MIDDLE)
+    {
+      return "MiddleMouseButtonUp";
+    }
+    else if (super.getButton() == Button.RIGHT)
+    {
+      return "RightMouseButtonUp";
+    }
+    else
+    {
+      return "UnknownMouseButtonUp";
+    }
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see java.lang.Object#toString()
+   */
+  //-----------------------------------------------------------------------------------------------
+  @Override
+  public String toString()
+  {
+    if (super.getButton() == Button.LEFT)
+    {
+      return "left mouse button up";
+    }
+    else if (super.getButton() == Button.MIDDLE)
+    {
+      return "middle mouse button up";
+    }
+    else if (super.getButton() == Button.RIGHT)
+    {
+      return "right mouse button up";
+    }
+    else
+    {
+      return "unknown mouse button up";
+    }
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see de.harms.attef.userinteraction.Interaction#startsLogicalSequence()
+   */
+  //-----------------------------------------------------------------------------------------------
+  public boolean startsLogicalSequence()
+  {
+    return false;
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see de.harms.attef.userinteraction.Interaction#finishesLogicalSequence()
+   */
+  //-----------------------------------------------------------------------------------------------
+  public boolean finishesLogicalSequence()
+  {
+    return true;
+  }
+
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/MouseClick.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/MouseClick.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/MouseClick.java	(revision 891)
@@ -0,0 +1,103 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: Click.java,v $
+// Version   : $Revision: 0.0 $  $Author: Patrick $  $Date: 06.11.2011 10:28:39 $
+// Project   : TaskTreePerformanceTest
+// Creation  : 2011 by Patrick
+// Copyright : Patrick Harms, 2011
+//-------------------------------------------------------------------------------------------------
+
+package de.ugoe.cs.quest.eventcore.userinteraction;
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ *
+ * @version $Revision: $ $Date: $
+ * @author  2011, last modified by $Author: $
+ */
+//-------------------------------------------------------------------------------------------------
+public class MouseClick extends MouseButtonInteraction
+{
+
+  //-----------------------------------------------------------------------------------------------
+  /**
+   * @param button
+   */
+  //-----------------------------------------------------------------------------------------------
+  public MouseClick(Button button)
+  {
+    super(button);
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see de.harms.attef.userinteraction.Interaction#getName()
+   */
+  //-----------------------------------------------------------------------------------------------
+  public String getName()
+  {
+    if (super.getButton() == Button.LEFT)
+    {
+      return "LeftMouseClick";
+    }
+    else if (super.getButton() == Button.MIDDLE)
+    {
+      return "MiddleMouseClick";
+    }
+    else if (super.getButton() == Button.RIGHT)
+    {
+      return "RightMouseClick";
+    }
+    else
+    {
+      return "UnknownMouseButtonClick";
+    }
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see java.lang.Object#toString()
+   */
+  //-----------------------------------------------------------------------------------------------
+  @Override
+  public String toString()
+  {
+    if (super.getButton() == Button.LEFT)
+    {
+      return "left mouse click";
+    }
+    else if (super.getButton() == Button.MIDDLE)
+    {
+      return "middle mouse click";
+    }
+    else if (super.getButton() == Button.RIGHT)
+    {
+      return "right mouse click";
+    }
+    else
+    {
+      return "unknown mouse button click";
+    }
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see de.harms.attef.userinteraction.Interaction#startsLogicalSequence()
+   */
+  //-----------------------------------------------------------------------------------------------
+  public boolean startsLogicalSequence()
+  {
+    return false;
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see de.harms.attef.userinteraction.Interaction#finishesLogicalSequence()
+   */
+  //-----------------------------------------------------------------------------------------------
+  public boolean finishesLogicalSequence()
+  {
+    return false;
+  }
+
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/MouseInteraction.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/MouseInteraction.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/MouseInteraction.java	(revision 891)
@@ -0,0 +1,22 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: Click.java,v $
+// Version   : $Revision: 0.0 $  $Author: Patrick $  $Date: 06.11.2011 10:28:39 $
+// Project   : TaskTreePerformanceTest
+// Creation  : 2011 by Patrick
+// Copyright : Patrick Harms, 2011
+//-------------------------------------------------------------------------------------------------
+
+package de.ugoe.cs.quest.eventcore.userinteraction;
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ *
+ * @version $Revision: $ $Date: $
+ * @author  2011, last modified by $Author: $
+ */
+//-------------------------------------------------------------------------------------------------
+public abstract class MouseInteraction implements Interaction
+{
+
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/TextInput.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/TextInput.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/TextInput.java	(revision 891)
@@ -0,0 +1,65 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: TextSelection.java,v $
+// Version   : $Revision: 0.0 $  $Author: Patrick $  $Date: 27.11.2011 18:11:29 $
+// Project   : TaskTreePerformanceTest
+// Creation  : 2011 by Patrick
+// Copyright : Patrick Harms, 2011
+//-------------------------------------------------------------------------------------------------
+
+package de.ugoe.cs.quest.eventcore.userinteraction;
+
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ *
+ * @version $Revision: $ $Date: $
+ * @author  2011, last modified by $Author: $
+ */
+//-------------------------------------------------------------------------------------------------
+
+public class TextInput implements Interaction
+{
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see de.harms.attef.userinteraction.Interaction#getName()
+   */
+  //-----------------------------------------------------------------------------------------------
+  public String getName()
+  {
+    return "TextInput";
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see java.lang.Object#toString()
+   */
+  //-----------------------------------------------------------------------------------------------
+  @Override
+  public String toString()
+  {
+    return "input text";
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see de.harms.attef.userinteraction.Interaction#startsLogicalSequence()
+   */
+  //-----------------------------------------------------------------------------------------------
+  public boolean startsLogicalSequence()
+  {
+    return false;
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see de.harms.attef.userinteraction.Interaction#finishesLogicalSequence()
+   */
+  //-----------------------------------------------------------------------------------------------
+  public boolean finishesLogicalSequence()
+  {
+    return false;
+  }
+
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/TextSelection.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/TextSelection.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/TextSelection.java	(revision 891)
@@ -0,0 +1,65 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: TextSelection.java,v $
+// Version   : $Revision: 0.0 $  $Author: Patrick $  $Date: 27.11.2011 18:11:29 $
+// Project   : TaskTreePerformanceTest
+// Creation  : 2011 by Patrick
+// Copyright : Patrick Harms, 2011
+//-------------------------------------------------------------------------------------------------
+
+package de.ugoe.cs.quest.eventcore.userinteraction;
+
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ *
+ * @version $Revision: $ $Date: $
+ * @author  2011, last modified by $Author: $
+ */
+//-------------------------------------------------------------------------------------------------
+
+public class TextSelection implements Interaction
+{
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see de.harms.attef.userinteraction.Interaction#getName()
+   */
+  //-----------------------------------------------------------------------------------------------
+  public String getName()
+  {
+    return "TextSelection";
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see java.lang.Object#toString()
+   */
+  //-----------------------------------------------------------------------------------------------
+  @Override
+  public String toString()
+  {
+    return "select text";
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see de.harms.attef.userinteraction.Interaction#startsLogicalSequence()
+   */
+  //-----------------------------------------------------------------------------------------------
+  public boolean startsLogicalSequence()
+  {
+    return false;
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see de.harms.attef.userinteraction.Interaction#finishesLogicalSequence()
+   */
+  //-----------------------------------------------------------------------------------------------
+  public boolean finishesLogicalSequence()
+  {
+    return false;
+  }
+
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/UserInteractionProvider.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/UserInteractionProvider.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/UserInteractionProvider.java	(revision 891)
@@ -0,0 +1,44 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: UserInteractionObserver.java,v $
+// Version   : $Revision: 0.0 $  $Author: Patrick $  $Date: 06.11.2011 10:16:33 $
+// Project   : TaskTreePerformanceTest
+// Creation  : 2011 by Patrick
+// Copyright : Patrick Harms, 2011
+//-------------------------------------------------------------------------------------------------
+
+package de.ugoe.cs.quest.eventcore.userinteraction;
+
+import java.util.Observable;
+
+import de.ugoe.cs.quest.eventcore.guimodel.GUIElement;
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ *
+ * @version $Revision: $ $Date: $
+ * @author  2011, last modified by $Author: $
+ */
+//-------------------------------------------------------------------------------------------------
+public class UserInteractionProvider extends Observable
+{
+  /** */
+  private static final UserInteractionProvider mInstance = new UserInteractionProvider();
+  
+  /**
+   * 
+   */
+  public static UserInteractionProvider getInstance()
+  {
+    return mInstance;
+  }
+  
+  /**
+   * 
+   */
+  public void notifyUserInteraction(GUIElement guiElement, Interaction interaction)
+  {
+    super.setChanged();
+    super.notifyObservers(new InteractionEvent(guiElement, interaction));
+  }
+}
Index: /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/ValueSelection.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/ValueSelection.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/main/java/de/ugoe/cs/quest/eventcore/userinteraction/ValueSelection.java	(revision 891)
@@ -0,0 +1,110 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: TextSelection.java,v $
+// Version   : $Revision: 0.0 $  $Author: Patrick $  $Date: 27.11.2011 18:11:29 $
+// Project   : TaskTreePerformanceTest
+// Creation  : 2011 by Patrick
+// Copyright : Patrick Harms, 2011
+//-------------------------------------------------------------------------------------------------
+
+package de.ugoe.cs.quest.eventcore.userinteraction;
+
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ *
+ * @version $Revision: $ $Date: $
+ * @author  2011, last modified by $Author: $
+ */
+//-------------------------------------------------------------------------------------------------
+
+public class ValueSelection<T> implements Interaction
+{
+  /** */
+  private T mSelectedValue;
+
+  //-----------------------------------------------------------------------------------------------
+  /**
+   * TODO: comment
+   *
+   * @param selectedValue
+   */
+  //-----------------------------------------------------------------------------------------------
+  public ValueSelection(T selectedValue)
+  {
+    mSelectedValue = selectedValue;
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see de.harms.attef.userinteraction.Interaction#getName()
+   */
+  //-----------------------------------------------------------------------------------------------
+  public String getName()
+  {
+    return "ValueSelection";
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see java.lang.Object#toString()
+   */
+  //-----------------------------------------------------------------------------------------------
+  @Override
+  public String toString()
+  {
+    return "select value";
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see de.harms.attef.userinteraction.Interaction#startsLogicalSequence()
+   */
+  //-----------------------------------------------------------------------------------------------
+  public boolean startsLogicalSequence()
+  {
+    return false;
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see de.harms.attef.userinteraction.Interaction#finishesLogicalSequence()
+   */
+  //-----------------------------------------------------------------------------------------------
+  public boolean finishesLogicalSequence()
+  {
+    return false;
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /**
+   * @return the selectedValue
+   */
+  //-----------------------------------------------------------------------------------------------
+  public T getSelectedValue()
+  {
+    return mSelectedValue;
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /* (non-Javadoc)
+   * @see java.lang.Object#equals(java.lang.Object)
+   */
+  //-----------------------------------------------------------------------------------------------
+  @Override
+  public boolean equals(Object obj)
+  {
+    if ((obj == null) || (!(obj instanceof ValueSelection<?>)))
+    {
+      return false;
+    }
+    
+    ValueSelection<?> otherValueSelection = (ValueSelection<?>) obj;
+    
+    return
+      ((otherValueSelection != null) &&
+       (((mSelectedValue != null) && (mSelectedValue.equals(otherValueSelection.mSelectedValue))) ||
+        (otherValueSelection.mSelectedValue == null)));
+  }
+
+}
Index: /trunk/autoquest-core-events-patrick/src/test/java/de/ugoe/cs/quest/eventcore/userinteraction/InteractionEventListTest.java
===================================================================
--- /trunk/autoquest-core-events-patrick/src/test/java/de/ugoe/cs/quest/eventcore/userinteraction/InteractionEventListTest.java	(revision 891)
+++ /trunk/autoquest-core-events-patrick/src/test/java/de/ugoe/cs/quest/eventcore/userinteraction/InteractionEventListTest.java	(revision 891)
@@ -0,0 +1,360 @@
+//-------------------------------------------------------------------------------------------------
+// Module    : $RCSfile: InteractionEventListTest.java,v $
+// Version   : $Revision: 0.0 $  $Author: Patrick $  $Date: 04.12.2011 11:25:24 $
+// Project   : TaskTreePerformanceTest
+// Creation  : 2011 by Patrick
+// Copyright : Patrick Harms, 2011
+//-------------------------------------------------------------------------------------------------
+
+package de.ugoe.cs.quest.eventcore.userinteraction;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Test;
+
+import de.ugoe.cs.quest.eventcore.guimodel.AbstractDefaultGUIElement;
+import de.ugoe.cs.quest.eventcore.guimodel.GUIElement;
+import de.ugoe.cs.quest.eventcore.userinteraction.InteractionEvent;
+import de.ugoe.cs.quest.eventcore.userinteraction.InteractionEventList;
+import de.ugoe.cs.quest.eventcore.userinteraction.KeyPressed;
+import de.ugoe.cs.quest.eventcore.userinteraction.KeyReleased;
+import de.ugoe.cs.tasktree.keyboardmaps.VirtualKey;
+
+//-------------------------------------------------------------------------------------------------
+/**
+ * TODO comment
+ *
+ * @version $Revision: $ $Date: $
+ * @author  2011, last modified by $Author: $
+ */
+//-------------------------------------------------------------------------------------------------
+
+public class InteractionEventListTest
+{
+
+  //-----------------------------------------------------------------------------------------------
+  /**
+   * 
+   */
+  //-----------------------------------------------------------------------------------------------
+  @Test
+  public void testDifferentCombinationKeyCombinations()
+  {
+    List<InteractionEvent> checkList = new ArrayList<InteractionEvent>();
+    InteractionEventList eventList = new InteractionEventList();
+    
+    GUIElement guiElement = new AbstractDefaultGUIElement()
+    {
+      @Override
+      public boolean equals(GUIElement other)
+      {
+        return this == other;
+      }
+    };
+    
+    // check first of all a normal pressing and releasing of A and B
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_A)));
+    eventList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_A)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_B)));
+    eventList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_B)));
+    
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_A)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_A)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_B)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_B)));
+    
+    assertEquals(checkList.size(), eventList.size());
+    
+    for (int i = 0; i < checkList.size(); i++)
+    {
+      assertEquals(checkList.get(i).getInteraction(), eventList.get(i).getInteraction());
+    }
+    
+    // check what happens if A is pressed and not released before B is pressed
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_C)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_D)));
+    eventList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_C)));
+    eventList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_D)));
+    
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_C)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_C)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_D)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_D)));
+    
+    assertEquals(checkList.size(), eventList.size());
+    
+    for (int i = 0; i < checkList.size(); i++)
+    {
+      assertEquals(checkList.get(i).getInteraction(), eventList.get(i).getInteraction());
+    }
+    
+    // now SHIFT is pressed and released after all keys are pressed
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.SHIFT)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_E)));
+    eventList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_E)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_F)));
+    eventList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_F)));
+    eventList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.SHIFT)));
+    
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.SHIFT)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_E)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_E)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_F)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_F)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.SHIFT)));
+    
+    assertEquals(checkList.size(), eventList.size());
+    
+    for (int i = 0; i < checkList.size(); i++)
+    {
+      assertEquals(checkList.get(i).getInteraction(), eventList.get(i).getInteraction());
+    }
+    
+    // now SHIFT is released before the last key is released
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.SHIFT)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_G)));
+    eventList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_G)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_H)));
+    eventList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.SHIFT)));
+    eventList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_H)));
+    
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.SHIFT)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_G)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_G)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_H)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_H)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.SHIFT)));
+    
+    assertEquals(checkList.size(), eventList.size());
+    
+    for (int i = 0; i < checkList.size(); i++)
+    {
+      assertEquals(checkList.get(i).getInteraction(), eventList.get(i).getInteraction());
+    }
+    
+    // now SHIFT is released before all other keys are released
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.SHIFT)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_I)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_J)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_K)));
+    eventList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.SHIFT)));
+    eventList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_J)));
+    eventList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_K)));
+    eventList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_I)));
+    
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.SHIFT)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_I)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_I)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_J)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_J)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_K)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_K)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.SHIFT)));
+    
+    assertEquals(checkList.size(), eventList.size());
+    
+    for (int i = 0; i < checkList.size(); i++)
+    {
+      assertEquals(checkList.get(i).getInteraction(), eventList.get(i).getInteraction());
+    }
+    
+    // now SHIFT, CTRL and ALT are pressed and released after all keys are pressed
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.SHIFT)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.CONTROL)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.ALT)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_L)));
+    eventList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_L)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_M)));
+    eventList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_M)));
+    eventList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.ALT)));
+    eventList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.CONTROL)));
+    eventList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.SHIFT)));
+    
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.SHIFT)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.CONTROL)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.ALT)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_L)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_L)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_M)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_M)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.ALT)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.CONTROL)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.SHIFT)));
+    
+    assertEquals(checkList.size(), eventList.size());
+    
+    for (int i = 0; i < checkList.size(); i++)
+    {
+      assertEquals(checkList.get(i).getInteraction(), eventList.get(i).getInteraction());
+    }
+    
+    // now SHIFT, CTRL and ALT are released before the last key is released
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.SHIFT)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.CONTROL)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.ALT)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_N)));
+    eventList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_N)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_O)));
+    eventList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.ALT)));
+    eventList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.CONTROL)));
+    eventList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.SHIFT)));
+    eventList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_O)));
+    
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.SHIFT)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.CONTROL)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.ALT)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_N)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_N)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_O)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_O)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.ALT)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.CONTROL)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.SHIFT)));
+    
+    assertEquals(checkList.size(), eventList.size());
+    
+    for (int i = 0; i < checkList.size(); i++)
+    {
+      assertEquals(checkList.get(i).getInteraction(), eventList.get(i).getInteraction());
+    }
+
+    // now SHIFT, CTRL and ALT are released in another order and before some other keys are released
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.SHIFT)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.CONTROL)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.ALT)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_P)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_Q)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_R)));
+    eventList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_Q)));
+    eventList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.SHIFT)));
+    eventList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.ALT)));
+    eventList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.CONTROL)));
+    eventList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_R)));
+    eventList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_P)));
+    
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.SHIFT)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.CONTROL)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.ALT)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_P)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_P)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_Q)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_Q)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_R)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_R)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.ALT)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.CONTROL)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.SHIFT)));
+    
+    assertEquals(checkList.size(), eventList.size());
+    
+    for (int i = 0; i < checkList.size(); i++)
+    {
+      assertEquals(checkList.get(i).getInteraction(), eventList.get(i).getInteraction());
+    }
+  }
+
+  //-----------------------------------------------------------------------------------------------
+  /**
+   * 
+   */
+  //-----------------------------------------------------------------------------------------------
+  @Test
+  public void testSeveralSubsequentKeyPressedEvents()
+  {
+    List<InteractionEvent> checkList = new ArrayList<InteractionEvent>();
+    InteractionEventList eventList = new InteractionEventList();
+    
+    GUIElement guiElement = new AbstractDefaultGUIElement()
+    {
+      @Override
+      public boolean equals(GUIElement other)
+      {
+        return this == other;
+      }
+    };
+    
+    // check first of all a normal pressing and releasing of A and B
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_A)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_A)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_A)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_A)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_A)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_A)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_A)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_A)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_A)));
+    eventList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_A)));
+    
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_A)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_A)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_A)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_A)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_A)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_A)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_A)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_A)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_A)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_A)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_A)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_A)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_A)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_A)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_A)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_A)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_A)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_A)));
+    
+    assertEquals(checkList.size(), eventList.size());
+    
+    for (int i = 0; i < checkList.size(); i++)
+    {
+      assertEquals(checkList.get(i).getInteraction(), eventList.get(i).getInteraction());
+    }
+
+    // check first of all a normal pressing and releasing of A and B
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.SHIFT)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.SHIFT)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.SHIFT)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.SHIFT)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.SHIFT)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.SHIFT)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.SHIFT)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.SHIFT)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.SHIFT)));
+    eventList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_A)));
+    eventList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_A)));
+    eventList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.SHIFT)));
+    
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.SHIFT)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.SHIFT)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.SHIFT)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.SHIFT)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.SHIFT)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.SHIFT)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.SHIFT)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.SHIFT)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.SHIFT)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.SHIFT)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.SHIFT)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.SHIFT)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.SHIFT)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.SHIFT)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.SHIFT)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.SHIFT)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.SHIFT)));
+    checkList.add(new InteractionEvent(guiElement, new KeyPressed(VirtualKey.LETTER_A)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.LETTER_A)));
+    checkList.add(new InteractionEvent(guiElement, new KeyReleased(VirtualKey.SHIFT)));
+    
+    assertEquals(checkList.size(), eventList.size());
+    
+    for (int i = 0; i < checkList.size(); i++)
+    {
+      assertEquals(checkList.get(i).getInteraction(), eventList.get(i).getInteraction());
+    }
+  }
+    
+}
