Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
TULIP
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
14
Issues
14
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
NUI
TULIP
Commits
b669e054
Commit
b669e054
authored
Oct 26, 2015
by
Eric Tobias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2.1.0 - Added SpatialEvent and its listener.
parent
c43934be
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
136 additions
and
6 deletions
+136
-6
CHANGELOG.txt
CHANGELOG.txt
+10
-0
README.txt
README.txt
+0
-0
TULIP/.settings/org.eclipse.jdt.ui.prefs
TULIP/.settings/org.eclipse.jdt.ui.prefs
+1
-1
TULIP/src/lu/list/itis/dkd/tui/event/ContextEvent.java
TULIP/src/lu/list/itis/dkd/tui/event/ContextEvent.java
+11
-5
TULIP/src/lu/list/itis/dkd/tui/event/SpatialEvent.java
TULIP/src/lu/list/itis/dkd/tui/event/SpatialEvent.java
+75
-0
TULIP/src/lu/list/itis/dkd/tui/event/SpatialEventListener.java
.../src/lu/list/itis/dkd/tui/event/SpatialEventListener.java
+39
-0
No files found.
CHANGELOG.txt
0 → 100644
View file @
b669e054
2.1.0
+ Adding event broadcaster for TUI context events.
+ Added spatial handler to handle spatial positioning of tangibles.
2.0.0
+ Added abstraction layer (Adapter) to decouple core from the tangible protocol (TUIO)
+ Added network abstraction layer and implemented concrete examples (Bluetooth, Wifi, and Serial IO)
\ No newline at end of file
TULIP/Readme
.txt
→
README
.txt
View file @
b669e054
File moved
TULIP/.settings/org.eclipse.jdt.ui.prefs
View file @
b669e054
This diff is collapsed.
Click to expand it.
TULIP/src/lu/list/itis/dkd/tui/event/ContextEvent.java
View file @
b669e054
...
@@ -27,7 +27,7 @@ import java.util.EventObject;
...
@@ -27,7 +27,7 @@ import java.util.EventObject;
*
*
* @author Eric TOBIAS [eric.tobias@list.lu]
* @author Eric TOBIAS [eric.tobias@list.lu]
* @since 1.0
* @since 1.0
* @version
1.0.
2
* @version
2.0.4
2
*/
*/
@NonNullByDefault
@NonNullByDefault
public
class
ContextEvent
extends
EventObject
{
public
class
ContextEvent
extends
EventObject
{
...
@@ -74,9 +74,9 @@ public class ContextEvent extends EventObject {
...
@@ -74,9 +74,9 @@ public class ContextEvent extends EventObject {
* Enumeration denoting all context types that are captured by the enclosing
* Enumeration denoting all context types that are captured by the enclosing
* {@link ContextEvent} class.
* {@link ContextEvent} class.
*
*
* @author Eric TOBIAS [eric.tobias@
tudor
.lu]
* @author Eric TOBIAS [eric.tobias@
list
.lu]
* @since
5 Mar 2014
* @since
1.0
* @version
1
* @version
2.0.42
*/
*/
public
enum
ContextType
{
public
enum
ContextType
{
/** A cursor is dropped into the context. */
/** A cursor is dropped into the context. */
...
@@ -90,6 +90,12 @@ public class ContextEvent extends EventObject {
...
@@ -90,6 +90,12 @@ public class ContextEvent extends EventObject {
/** An object is moved within the context. */
/** An object is moved within the context. */
OBJECT_MOVE
,
OBJECT_MOVE
,
/** An object is lifted from the context. */
/** An object is lifted from the context. */
OBJECT_LIFT
;
OBJECT_LIFT
,
/** A blob is dropped from the context. */
BLOB_DROP
,
/** A blob is moved from the context. */
BLOB_MOVE
,
/** A blob is lifted from the context. */
BLOB_LIFT
;
}
}
}
}
\ No newline at end of file
TULIP/src/lu/list/itis/dkd/tui/event/SpatialEvent.java
0 → 100644
View file @
b669e054
/**
* Copyright Luxembourg Institute of Science and Technology, 2015. All rights reserved.
*
* 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.
*
* 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
* General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along with TULIP. If
* not, see <http://www.gnu.org/licenses/lgpl-3.0.html>.
*/
package
lu.list.itis.dkd.tui.event
;
import
lu.list.itis.dkd.dbc.annotation.NonNullByDefault
;
import
lu.list.itis.dkd.tui.adapter.TangibleObject
;
import
lu.list.itis.dkd.tui.utility.Point
;
import
lu.list.itis.dkd.tui.utility.ScreenCoordinates
;
import
com.google.common.base.Preconditions
;
import
java.util.EventObject
;
/**
* Class used to disseminate spatial events. Events are to be triggered when elements in the spatial
* domain of the interface are added, removed, or moved. The event contains a source, usually the
* tangible object that is the root of the spatial (dis)placement and the location the event was
* triggered on, and the type of even.<br>
* <br>
*
* <b>Note</b> that the location is expressed as {@link ScreenCoordinates}.
*
* @author Eric Tobias [eric.tobias@list.lu]
* @since 2.1
* @version 2.1.0
*/
@NonNullByDefault
public
class
SpatialEvent
extends
EventObject
{
private
static
final
long
serialVersionUID
=
7414656845719882078L
;
protected
Point
location
;
/**
* Constructor initializing all fields.
*
* @param source
* The source of the {@link SpatialEvent}, that is, the tangible object that triggered
* the event.
* @param location
* The location the event was triggered on. Note that the location must be expressed in
* {@link ScreenCoordinates}.
* @ore location.getState().getClass() == ScreenCoordinates.class
*/
public
SpatialEvent
(
TangibleObject
source
,
Point
location
)
{
super
(
source
);
Preconditions
.
checkArgument
(
location
.
getState
().
getClass
().
equals
(
ScreenCoordinates
.
class
),
"The location must be given in screen coordinates!"
);
//$NON-NLS-1$
this
.
location
=
location
;
}
/**
* Simple getter method for location.
*
* @return The value of location.
*/
public
Point
getLocation
()
{
return
location
;
}
}
\ No newline at end of file
TULIP/src/lu/list/itis/dkd/tui/event/SpatialEventListener.java
0 → 100644
View file @
b669e054
/**
* Copyright Luxembourg Institute of Science and Technology, 2015. All rights reserved.
*
* 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.
*
* 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
* General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along with TULIP. If
* not, see <http://www.gnu.org/licenses/lgpl-3.0.html>.
*/
package
lu.list.itis.dkd.tui.event
;
import
lu.list.itis.dkd.dbc.annotation.NonNullByDefault
;
import
java.util.EventListener
;
/**
* Interface specifying the contract for {@link SpatialEventListener} instances.
*
* @author Eric Tobias [eric.tobias@list.lu]
* @since 2.1
* @version 2.1.0
*/
@NonNullByDefault
public
interface
SpatialEventListener
extends
EventListener
{
/**
* Method invoked when the context is changed.
*
* @param event
* The event holding the source and location of the spacial happening.
*/
public
void
spaceUpdated
(
SpatialEvent
event
);
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment