Commit 8cd3532c authored by Eric Tobias's avatar Eric Tobias

Ported project to Maven.

+ Cleaned up a few class names to adhere to the naming policy
+ Switched to the new namespace of dbc-annotations
parent 02df5d1d
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="test"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry exported="true" kind="lib" path="libs/jdom-2.0.5.jar" sourcepath="libs/jdom-2.0.5-sources.jar">
<classpathentry kind="src" output="target/classes" path="src">
<attributes>
<attribute name="javadoc_location" value="jar:platform:/resource/TUI%20Framework/libs/jdom-2.0.5-javadoc.jar!/"/>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry exported="true" kind="lib" path="libs/guava-15.0.jar" sourcepath="libs/guava-15.0-sources.jar">
<classpathentry kind="src" output="target/test-classes" path="test">
<attributes>
<attribute name="javadoc_location" value="jar:platform:/resource/TUI%20Framework/libs/guava-15.0-javadoc.jar!/"/>
<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.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry exported="true" kind="lib" path="libs/dbc.annotation.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="lib" path="libs/bluecove-2.1.1-SNAPSHOT.jar"/>
<classpathentry kind="lib" path="libs/RXTXcomm.jar"/>
<classpathentry kind="lib" path="libs/libTUIO.jar"/>
<classpathentry kind="output" path="bin"/>
<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>
......@@ -6,3 +6,4 @@
/bin/
/bin/
/bin/
/target/
......@@ -10,8 +10,14 @@
<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>
......@@ -15,6 +15,8 @@ org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonN
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
......@@ -111,6 +113,7 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
......
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="build" name="TULIP">
<property environment="env"/>
<property name="ECLIPSE_HOME" value="../../../../../Eclipse x64 Luna/"/>
<property name="Climate_Change.location" value="../Climate Change"/>
<property name="junit.output.dir" value="junit"/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.7"/>
<property name="source" value="1.7"/>
<property name='build' location='bin' />
<property name='dist' location='dist' />
<property name='application.version' value='1.0'/>
<property name='application.name' value='TULIP'/>
<property name='distribution' value='${application.name}-${application.version}'/>
<tstamp><format property='build.time' pattern='yyyy-MM-dd HH:mm:ss'/></tstamp>
<path id="JUnit 4.libraryclasspath">
<pathelement location="${ECLIPSE_HOME}plugins/org.junit_4.11.0.v201303080030/junit.jar"/>
<pathelement location="${ECLIPSE_HOME}plugins/org.hamcrest.core_1.3.0.v201303031735.jar"/>
</path>
<path id="TULIP.classpath">
<pathelement location="${build}"/>
<path refid="JUnit 4.libraryclasspath"/>
<pathelement location="libs/jdom-2.0.5.jar"/>
<pathelement location="libs/guava-15.0.jar"/>
<pathelement location="libs/tuio-1.4.jar"/>
<pathelement location="libs/dbc.annotation.jar"/>
</path>
<path id="jar.classpath">
<pathelement location="jdom-2.0.5.jar"/>
<pathelement location="guava-15.0.jar"/>
<pathelement location="tuio-1.4.jar"/>
<pathelement location="dbc.annotation.jar"/>
</path>
<condition property='jdk.javadoc.visible' value='true' else='false'>
<http url='http://java.sun.com/javase/8/docs/api/' />
</condition>
<target name="init" depends="clean">
<echo>
Application: ${application.name} ${application.version}
Build File : ${ant.file}
Run Date : ${build.time}
Run by : ${user.name}
Build Dir : ${dist}
Base Dir : ${basedir}
Java Home : ${java.home}
Connected to the web : ${jdk.javadoc.visible}
</echo>
<mkdir dir="${dist}"/>
<mkdir dir="${build}"/>
</target>
<target name='clean' description="Delete all build artifacts." >
<delete includeEmptyDirs="true">
<fileset dir='${dist}'/>
</delete>
<delete includeEmptyDirs="true">
<fileset dir='bin'/>
</delete>
<mkdir dir="${build}"/>
<mkdir dir="${dist}"/>
<mkdir dir="${dist}/javadoc"/>
<mkdir dir="${dist}/assets"/>
</target>
<target name="build" depends="build-project,jar,source-and-doc,distribution,build-refprojects"/>
<target name="build-no-ref" depends="build-project,jar,source-and-doc,distribution"/>
<target name="build-project" depends="init">
<javac debug="true" debuglevel="${debuglevel}" destdir="bin" includeantruntime="false" source="${source}" target="${target}">
<src path="src"/>
<!--<src path="test"/>-->
<classpath refid="TULIP.classpath"/>
</javac>
</target>
<target name="build-refprojects" description="Build all projects which reference this project.">
<ant antfile="build.xml" dir="${Climate_Change.location}" inheritAll="false" target="build-no-sub">
<propertyset>
<propertyref name="build.compiler"/>
</propertyset>
</ant>
<copy file="${dist}/${distribution}.jar" todir="${Climate_Change.location}/dist/"/>
<copy todir="${Climate_Change.location}/dist/">
<fileset dir="libs"/>
</copy>
</target>
<target name='jar' description='Create a jar file for distribution.'>
<pathconvert property="manifest.classpath" pathsep=" ">
<path refid="jar.classpath" />
<flattenmapper />
</pathconvert>
<echo>TULIP classpath: ${manifest.classpath}</echo>
<jar destfile='${dist}/${distribution}.jar'>
<fileset dir="bin"/>
<!--<zipgroupfileset dir="libs" includes="*.jar"/>-->
<manifest>
<attribute name="Class-Path" value="${manifest.classpath}"/>
</manifest>
</jar>
<copy todir="${dist}/">
<fileset dir="libs">
<exclude name="sources.jar,javadoc.jar,test.jar"/>
</fileset>
</copy>
</target>
<target name="source-and-doc" description="Bundle sources and javadoc in a jar!" depends="javadoc">
<jar compress="${jar.compress}" basedir="src" jarfile="${dist}/${distribution}-sources.jar" />
<jar compress="${jar.compress}" basedir="${dist}/javadoc/" jarfile="${dist}/${distribution}-javadoc.jar" />
<copy file="calibration.xml" todir="${dist}/"/>
<copy file="properties.properties" todir="${dist}/"/>
<copy todir="${dist}/assets">
<fileset dir="assets"/>
</copy>
<jar compress="${jar.compress}" basedir="test" jarfile="${dist}/${distribution}-test.jar" />
</target>
<target name='javadoc' description='Generate javadoc.' >
<javadoc
use='true' author='true' version='true'
access='package'
sourcepath='src'
packagenames='*.*'
destdir='${dist}/javadoc'
windowtitle='${application.name} ${application.version}'
noqualifier='java.*:javax.*:com.sun.*'
linksource='true' >
<tag name="invariant" scope="all" description="Invariant:"/>
<tag name="post" scope="all" description="Postcondition:"/>
<tag name="pre" scope="all" description="Precondition:"/>
<classpath refid='TULIP.classpath'/>
<link href='http://java.sun.com/javase/8/docs/api/'/>
<header><![CDATA[<h1>${application.name} ${application.version}</h1>]]></header>
</javadoc>
</target>
<target name='distribution' description='Create zip file with project code and resources.'>
<zip destfile='${dist}/${distribution}.zip'>
<zipfileset dir='${dist}'>
<exclude name="${dist}/${distribution}.zip"/>
</zipfileset>
</zip>
</target>
</project>
\ No newline at end of file
<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>lu.list.itis.dkd.tui</groupId>
<artifactId>tulip</artifactId>
<version>2.0.41</version>
<name>TULIP</name>
<description>A framework for tabletop tangible user interface applications.</description>
<build>
<sourceDirectory>src</sourceDirectory>
<testSourceDirectory>test</testSourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.jdom</groupId>
<artifactId>jdom2</artifactId>
<version>2.0.5</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>15.0</version>
</dependency>
<dependency>
<groupId>net.sf.bluecove</groupId>
<artifactId>bluecove</artifactId>
<version>2.1.0</version>
</dependency>
<dependency>
<groupId>org.rxtx</groupId>
<artifactId>rxtx</artifactId>
<version>2.1.7</version>
</dependency>
<dependency>
<groupId>net.sourceforge.tuio</groupId>
<artifactId>tuio</artifactId>
<version>1.5</version>
</dependency>
<dependency>
<groupId>lu.list.itis.dkd</groupId>
<artifactId>dbc-annotation</artifactId>
<version>1.1</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
......@@ -16,14 +16,13 @@
*/
package lu.list.itis.dkd.tui;
import lu.list.itis.dkd.dbc.annotation.NonNullByDefault;
import lu.list.itis.dkd.dbc.annotation.Nullable;
import lu.list.itis.dkd.tui.adapter.TangibleObject;
import lu.list.itis.dkd.tui.adapter.TuiAdapter;
import lu.list.itis.dkd.tui.logging.EventLogger;
import lu.list.itis.dkd.tui.utility.GlobalContext;
import lu.list.itis.dkd.tui.utility.IDMapper;
import lu.tudor.ssi.kiss.dbc.annotation.NonNullByDefault;
import lu.tudor.ssi.kiss.dbc.annotation.Nullable;
import lu.list.itis.dkd.tui.utility.IdMapper;
import com.google.common.base.Preconditions;
......@@ -109,7 +108,7 @@ public abstract class TangibleApplication {
try {
adapter = (TuiAdapter) Class.forName(properties.getProperty("adapter.class")).getConstructor(TangibleInterfaceManager.class).newInstance(interfaceManager); //$NON-NLS-1$
} catch (InstantiationException e) {
logger.log(Level.SEVERE, "Cannot instantiate adapter. The adapter must be a concrete class, not an interface or abstract class and it must directly inherit from TuiAdapter! Check your properties file and set adapter.class accordingly."); //$NON-NLS-1$s
logger.log(Level.SEVERE, "Cannot instantiate adapter. The adapter must be a concrete class, not an interface or abstract class and it must directly inherit from TuiAdapter! Check your properties file and set adapter.class accordingly."); //$NON-NLS-1$ s
System.exit(42);
} catch (IllegalAccessException e) {
logger.log(Level.SEVERE, "The currently executing method does not have access to the definition of the constructor."); //$NON-NLS-1$
......@@ -127,12 +126,12 @@ public abstract class TangibleApplication {
logger.log(Level.SEVERE, "Security violation."); //$NON-NLS-1$
System.exit(42);
} catch (ClassNotFoundException e) {
logger.log(Level.SEVERE, "The class " + properties.getProperty("adapter.class") + " was not found. Check your spelling!"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
logger.log(Level.SEVERE, "The class " + properties.getProperty("adapter.class") + " was not found. Check your spelling!"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
System.exit(42);
}
GlobalContext.setGlobalContext(adapter);
IDMapper.initialise(properties);
IdMapper.initialise(properties);
EventLogger.getInstance().initialise(properties);
}
......
......@@ -16,14 +16,13 @@
*/
package lu.list.itis.dkd.tui;
import lu.list.itis.dkd.dbc.annotation.NonNullByDefault;
import lu.list.itis.dkd.dbc.annotation.Nullable;
import lu.list.itis.dkd.tui.content.Content;
import lu.list.itis.dkd.tui.content.InformationProvider;
import lu.list.itis.dkd.tui.content.Zoomable;
import lu.list.itis.dkd.tui.event.ContentEventListener;
import lu.tudor.ssi.kiss.dbc.annotation.NonNullByDefault;
import lu.tudor.ssi.kiss.dbc.annotation.Nullable;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
......
......@@ -16,14 +16,13 @@
*/
package lu.list.itis.dkd.tui;
import lu.list.itis.dkd.dbc.annotation.NonNullByDefault;
import lu.list.itis.dkd.dbc.annotation.Nullable;
import lu.list.itis.dkd.tui.content.Content;
import lu.list.itis.dkd.tui.utility.Calibration;
import lu.list.itis.dkd.tui.utility.TextHelper;
import lu.list.itis.dkd.tui.widget.BaseWidget;
import lu.tudor.ssi.kiss.dbc.annotation.NonNullByDefault;
import lu.tudor.ssi.kiss.dbc.annotation.Nullable;
import com.google.common.base.Preconditions;
import java.awt.Color;
......@@ -126,7 +125,9 @@ public class TangibleInterfaceManager extends JComponent {
setupWindow();
showWindow();
/** Checks added due to missing contracts on inherited or implemented classes or interfaces. */
/**
* Checks added due to missing contracts on inherited or implemented classes or interfaces.
*/
assert title != null;
assert device != null;
}
......@@ -393,7 +394,7 @@ public class TangibleInterfaceManager extends JComponent {
public void keyPressed(@Nullable KeyEvent event) {
Preconditions.checkArgument(event != null, "The event is null!"); //$NON-NLS-1$
switch (event.getKeyCode()) {
/** Exit calibration mode without storing changes. */
/** Exit calibration mode without storing changes. */
case KeyEvent.VK_ESCAPE:
destroyWindow();
setupWindow();
......
......@@ -16,18 +16,17 @@
*/
package lu.list.itis.dkd.tui;
import lu.list.itis.dkd.dbc.annotation.NonNullByDefault;
import lu.list.itis.dkd.dbc.annotation.Nullable;
import lu.list.itis.dkd.tui.adapter.TangibleObject;
import lu.list.itis.dkd.tui.exception.BuildException;
import lu.list.itis.dkd.tui.utility.IDMapper;
import lu.list.itis.dkd.tui.utility.IdMapper;
import lu.list.itis.dkd.tui.utility.Point;
import lu.list.itis.dkd.tui.widget.BaseWidget;
import lu.list.itis.dkd.tui.widget.builder.BaseWidgetBuilder;
import lu.list.itis.dkd.tui.widget.corona.ShapeFactory;
import lu.list.itis.dkd.tui.widget.corona.builder.ShadowBuilder;
import lu.tudor.ssi.kiss.dbc.annotation.NonNullByDefault;
import lu.tudor.ssi.kiss.dbc.annotation.Nullable;
import com.google.common.base.Preconditions;
import java.util.Collection;
......@@ -49,7 +48,9 @@ import java.util.logging.Logger;
*/
@NonNullByDefault
public abstract class TangibleObjectManager {
/** This dictionary stores all tangibles detected by reacTIVision relevant to the application. */
/**
* This dictionary stores all tangibles detected by reacTIVision relevant to the application.
*/
protected volatile static ConcurrentHashMap<Integer, BaseWidget> objectList = new ConcurrentHashMap<>();
/** This dictionary stores all cursors detected by reacTIVision. */
......@@ -86,10 +87,11 @@ public abstract class TangibleObjectManager {
/**
* Method used to define all widgets. In this method, all handles need to be assigned to
* instances of {@link BaseWidget} or a child thereof. Implementing classes should define what
* widgets to use by implementing this method. <b>By default, no widgets are instantiated</b>.<br>
* widgets to use by implementing this method. <b>By default, no widgets are instantiated</b>.
* <br>
* <br>
*
* When adding Widgets to map to cursors, refer to {@link IDMapper#remapCursorId(int)}. Cursor
* When adding Widgets to map to cursors, refer to {@link IdMapper#remapCursorId(int)}. Cursor
* IDs are remapped as not to clash with any symbol ID assigned by reacTIVision. A good practice
* is to reason with regular cursor IDs and add them to the map by calling for example:
* <code>objectList.put(remapCursorID(0), W extends BaseWidget);</code> to the first cursor that
......
......@@ -16,12 +16,11 @@
*/
package lu.list.itis.dkd.tui.adapter;
import lu.list.itis.dkd.dbc.annotation.NonNullByDefault;
import lu.list.itis.dkd.dbc.annotation.Nullable;
import lu.list.itis.dkd.tui.TangibleApplication;
import lu.list.itis.dkd.tui.utility.Point;
import lu.tudor.ssi.kiss.dbc.annotation.NonNullByDefault;
import lu.tudor.ssi.kiss.dbc.annotation.Nullable;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;
......
......@@ -16,12 +16,11 @@
*/
package lu.list.itis.dkd.tui.adapter;
import lu.list.itis.dkd.dbc.annotation.NonNullByDefault;
import lu.list.itis.dkd.tui.adapter.TangibleObject.State;
import lu.list.itis.dkd.tui.adapter.TangibleObject.Type;
import lu.list.itis.dkd.tui.utility.Point;
import lu.tudor.ssi.kiss.dbc.annotation.NonNullByDefault;
import java.util.ArrayList;
/**
......
......@@ -16,12 +16,11 @@
*/
package lu.list.itis.dkd.tui.adapter;
import lu.list.itis.dkd.dbc.annotation.NonNullByDefault;
import lu.list.itis.dkd.tui.TangibleInterfaceManager;
import lu.list.itis.dkd.tui.TangibleObjectManager;
import lu.list.itis.dkd.tui.logging.EventLogger;
import lu.tudor.ssi.kiss.dbc.annotation.NonNullByDefault;
import java.util.Collection;
import java.util.logging.Level;
import java.util.logging.Logger;
......
......@@ -16,14 +16,20 @@
*/
package lu.list.itis.dkd.tui.adapter;
import lu.list.itis.dkd.dbc.annotation.NonNullByDefault;
import lu.list.itis.dkd.tui.TangibleInterfaceManager;
import lu.list.itis.dkd.tui.TangibleObjectManager;
import lu.list.itis.dkd.tui.adapter.TangibleObject.Type;
import lu.list.itis.dkd.tui.logging.EventLogger;
import lu.list.itis.dkd.tui.utility.IDMapper;
import lu.list.itis.dkd.tui.utility.IdMapper;
import lu.list.itis.dkd.tui.utility.Point;
import lu.tudor.ssi.kiss.dbc.annotation.NonNullByDefault;
import com.google.common.base.Preconditions;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Vector;
import java.util.concurrent.ConcurrentHashMap;
import TUIO.TuioBlob;
import TUIO.TuioClient;
......@@ -32,13 +38,6 @@ import TUIO.TuioListener;
import TUIO.TuioObject;
import TUIO.TuioTime;
import com.google.common.base.Preconditions;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Vector;
import java.util.concurrent.ConcurrentHashMap;
/**
* Adapter class managing interaction with reacTIVision tangible table using TUIO protocol.
*
......@@ -196,7 +195,7 @@ public class TuioAdapter extends TuiAdapter implements TuioListener {
ArrayList<Point> tempPath = new ArrayList<>();
tuioCursor.getPath().forEach(path -> tempPath.add(new Point(path.getX(), path.getY(), 0)));
TangibleObject convertedTangibleObject = new TangibleObjectBuilder(IDMapper.remapCursorId(tuioCursor.getCursorID()), Type.CURSOR, tuioCursor.getPath().get(tuioCursor.getPath().size() - 1).getX(), tuioCursor.getPath().get(tuioCursor.getPath().size() - 1).getY())
TangibleObject convertedTangibleObject = new TangibleObjectBuilder(IdMapper.remapCursorId(tuioCursor.getCursorID()), Type.CURSOR, tuioCursor.getPath().get(tuioCursor.getPath().size() - 1).getX(), tuioCursor.getPath().get(tuioCursor.getPath().size() - 1).getY())
.withSeconds(tuioCursor.getTuioTime().getSeconds())
.withMicroSeconds(tuioCursor.getTuioTime().getMicroseconds())
.withxSpeed(tuioCursor.getXSpeed())
......@@ -228,7 +227,7 @@ public class TuioAdapter extends TuiAdapter implements TuioListener {
ArrayList<Point> tempPath = new ArrayList<>();
tuioBlob.getPath().forEach(path -> tempPath.add(new Point(path.getX(), path.getY(), tuioBlob.getAngle())));
convertedTangibleObject = new TangibleObjectBuilder(IDMapper.remapCursorId(tuioBlob.getBlobID()), Type.BLOB, tuioBlob.getPath().get(tuioBlob.getPath().size() - 1).getX(), tuioBlob.getPath().get(tuioBlob.getPath().size() - 1).getY())
convertedTangibleObject = new TangibleObjectBuilder(IdMapper.remapCursorId(tuioBlob.getBlobID()), Type.BLOB, tuioBlob.getPath().get(tuioBlob.getPath().size() - 1).getX(), tuioBlob.getPath().get(tuioBlob.getPath().size() - 1).getY())
.withSeconds(tuioBlob.getTuioTime().getSeconds())
.withMicroSeconds(tuioBlob.getTuioTime().getMicroseconds())
.withxSpeed(tuioBlob.getXSpeed())
......@@ -248,7 +247,7 @@ public class TuioAdapter extends TuiAdapter implements TuioListener {
int index = tuioBlob.getPath().size() - 1;
tempPath.add(new Point(tuioBlob.getPath().get(index).getX(), tuioBlob.getPath().get(index).getY(), tuioBlob.getAngle()));
convertedTangibleObject = new TangibleObjectBuilder(IDMapper.remapCursorId(tuioBlob.getBlobID()), Type.BLOB, tuioBlob.getPath().get(tuioBlob.getPath().size() - 1).getX(), tuioBlob.getPath().get(tuioBlob.getPath().size() - 1).getY())
convertedTangibleObject = new TangibleObjectBuilder(IdMapper.remapCursorId(tuioBlob.getBlobID()), Type.BLOB, tuioBlob.getPath().get(tuioBlob.getPath().size() - 1).getX(), tuioBlob.getPath().get(tuioBlob.getPath().size() - 1).getY())
.withSeconds(tuioBlob.getTuioTime().getSeconds())
.withMicroSeconds(tuioBlob.getTuioTime().getMicroseconds())
.withxSpeed(tuioBlob.getXSpeed())
......@@ -477,7 +476,7 @@ public class TuioAdapter extends TuiAdapter implements TuioListener {
*/
@Override
public TangibleObject getCursor(long id) {
return convertTuioCursorToTangibleObject(client.getTuioCursor(IDMapper.remapTangibleObjectId((int) id)));
return convertTuioCursorToTangibleObject(client.getTuioCursor(IdMapper.remapTangibleObjectId((int) id)));
}
/**
......@@ -497,6 +496,6 @@ public class TuioAdapter extends TuiAdapter implements TuioListener {
*/
@Override
public TangibleObject getBlob(long id) {
return convertTuioBlobToTangibleObject(client.getTuioBlob(IDMapper.remapTangibleObjectId((int) id)));
return convertTuioBlobToTangibleObject(client.getTuioBlob(IdMapper.remapTangibleObjectId((int) id)));
}
}
\ No newline at end of file
......@@ -4,8 +4,8 @@
* This file is part of TULIP.
*
* TULIP is free software: you can redistribute it and/or modify it under the terms of the GNU
* Lesser General Public License as published by the Free Software Foundation, version 3 of
* the License.
* Lesser General Public License as published by the Free Software Foundation, version 3 of the
* License.
*
* TULIP is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
......@@ -16,10 +16,9 @@
*/
package lu.list.itis.dkd.tui.content;
import lu.list.itis.dkd.dbc.annotation.NonNullByDefault;
import lu.list.itis.dkd.tui.utility.Point;
import lu.tudor.ssi.kiss.dbc.annotation.NonNullByDefault;