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

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
......@@ -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;
/**
* @author Eric TOBIAS [eric.tobias@list.lu]
* @since 1.0
......
......@@ -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,8 +16,8 @@
*/
package lu.list.itis.dkd.tui.content;
import lu.tudor.ssi.kiss.dbc.annotation.NonNullByDefault;
import lu.tudor.ssi.kiss.dbc.annotation.Nullable;
import lu.list.itis.dkd.dbc.annotation.NonNullByDefault;
import lu.list.itis.dkd.dbc.annotation.Nullable;
import java.awt.Graphics2D;
......
......@@ -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;
/**
* Interface specifying the contract for all information provider instances.
*
......
......@@ -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,7 +16,7 @@
*/
package lu.list.itis.dkd.tui.content;
import lu.tudor.ssi.kiss.dbc.annotation.NonNullByDefault;
import lu.list.itis.dkd.dbc.annotation.NonNullByDefault;
/**
* @author Eric TOBIAS [eric.tobias@list.lu]
......
......@@ -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,12 +16,11 @@
*/
package lu.list.itis.dkd.tui.content;
import lu.list.itis.dkd.dbc.annotation.NonNullByDefault;
import lu.list.itis.dkd.dbc.annotation.Nullable;
import lu.list.itis.dkd.tui.utility.Point;
import lu.list.itis.dkd.tui.widget.ZoomWidget;
import lu.tudor.ssi.kiss.dbc.annotation.NonNullByDefault;
import lu.tudor.ssi.kiss.dbc.annotation.Nullable;
/**
* Interface imposing functionality in order to be used with the {@link ZoomWidget}.
*
......
......@@ -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.event;
import lu.list.itis.dkd.dbc.annotation.NonNullByDefault;
import lu.list.itis.dkd.tui.widget.BaseWidget;
import lu.tudor.ssi.kiss.dbc.annotation.NonNullByDefault;
import java.util.EventObject;
/**
......
......@@ -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,7 +16,7 @@
*/
package lu.list.itis.dkd.tui.event;
import lu.tudor.ssi.kiss.dbc.annotation.NonNullByDefault;
import lu.list.itis.dkd.dbc.annotation.NonNullByDefault;
import java.util.EventListener;
......
......@@ -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,8 +16,8 @@
*/
package lu.list.itis.dkd.tui.event;
import lu.tudor.ssi.kiss.dbc.annotation.NonNullByDefault;
import lu.tudor.ssi.kiss.dbc.annotation.Nullable;
import lu.list.itis.dkd.dbc.annotation.NonNullByDefault;
import lu.list.itis.dkd.dbc.annotation.Nullable;
import java.util.EventObject;
......
......@@ -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.event;
import lu.list.itis.dkd.dbc.annotation.NonNullByDefault;
import lu.list.itis.dkd.tui.exception.UnsupportedInformationException;
import lu.tudor.ssi.kiss.dbc.annotation.NonNullByDefault;
import java.util.EventListener;
/**
......
......@@ -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.event;
import lu.list.itis.dkd.dbc.annotation.NonNullByDefault;
import lu.list.itis.dkd.tui.widget.state.StateManager;
import lu.tudor.ssi.kiss.dbc.annotation.NonNullByDefault;
import java.util.EventObject;
/**
......
......@@ -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,11 +16,10 @@
*/
package lu.list.itis.dkd.tui.event;
import lu.list.itis.dkd.dbc.annotation.NonNullByDefault;
import lu.list.itis.dkd.tui.widget.StatefulWidget;
import lu.list.itis.dkd.tui.widget.state.StateManager;
import lu.tudor.ssi.kiss.dbc.annotation.NonNullByDefault;
import java.util.EventListener;
/**
......
......@@ -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,7 +16,7 @@
*/
package lu.list.itis.dkd.tui.exception;
import lu.tudor.ssi.kiss.dbc.annotation.NonNullByDefault;
import lu.list.itis.dkd.dbc.annotation.NonNullByDefault;
/**
* Exception raised when the building on a widget or corona instance cannot complete successfully
......
......@@ -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,7 +16,7 @@
*/
package lu.list.itis.dkd.tui.exception;
import lu.tudor.ssi.kiss.dbc.annotation.NonNullByDefault;
import lu.list.itis.dkd.dbc.annotation.NonNullByDefault;
/**
* Class modelling a simple exception to be thrown when provided information cannot be processed.
......
......@@ -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,8 +16,8 @@
*/
package lu.list.itis.dkd.tui.logging;
import lu.tudor.ssi.kiss.dbc.annotation.NonNullByDefault;
import lu.tudor.ssi.kiss.dbc.annotation.Nullable;
import lu.list.itis.dkd.dbc.annotation.NonNullByDefault;
import lu.list.itis.dkd.dbc.annotation.Nullable;
import org.jdom2.Document;
import org.jdom2.Element;
......
......@@ -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,7 +16,7 @@
*/
package lu.list.itis.dkd.tui.network.adapter;
import lu.tudor.ssi.kiss.dbc.annotation.NonNullByDefault;
import lu.list.itis.dkd.dbc.annotation.NonNullByDefault;
import java.io.IOException;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment