Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
NUI
TULIP
Commits
a09afead
Commit
a09afead
authored
Apr 20, 2015
by
Nicolas Gilmard
Browse files
Add modification in properties files for load adapter reflexively
parent
f7dae866
Changes
8
Hide whitespace changes
Inline
Side-by-side
TULIP/properties.properties
View file @
a09afead
...
@@ -17,6 +17,9 @@ fontSize = 13
...
@@ -17,6 +17,9 @@ fontSize = 13
colour
=
BLACK
colour
=
BLACK
centred
=
false
centred
=
false
# Adapter to load
tableAdapter
=
tuio
# Properties for the calibration of the object manager
# Properties for the calibration of the object manager
#The value below is best left at or above 1024
#The value below is best left at or above 1024
cursorIDRemappingConstant
=
1024
cursorIDRemappingConstant
=
1024
\ No newline at end of file
TULIP/src/lu/list/itis/dkd/tui/TangibleApplication.java
View file @
a09afead
...
@@ -15,7 +15,6 @@ package lu.list.itis.dkd.tui;
...
@@ -15,7 +15,6 @@ package lu.list.itis.dkd.tui;
import
lu.list.itis.dkd.tui.adapter.TangibleObject
;
import
lu.list.itis.dkd.tui.adapter.TangibleObject
;
import
lu.list.itis.dkd.tui.adapter.TuiAdapter
;
import
lu.list.itis.dkd.tui.adapter.TuiAdapter
;
import
lu.list.itis.dkd.tui.adapter.TuioConcreteAdapter
;
import
lu.list.itis.dkd.tui.logging.EventLogger
;
import
lu.list.itis.dkd.tui.logging.EventLogger
;
import
lu.list.itis.dkd.tui.utility.GlobalContext
;
import
lu.list.itis.dkd.tui.utility.GlobalContext
;
import
lu.list.itis.dkd.tui.utility.IDMapper
;
import
lu.list.itis.dkd.tui.utility.IDMapper
;
...
@@ -28,6 +27,7 @@ import com.google.common.base.Preconditions;
...
@@ -28,6 +27,7 @@ import com.google.common.base.Preconditions;
import
java.io.File
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.lang.reflect.InvocationTargetException
;
import
java.util.Collection
;
import
java.util.Collection
;
import
java.util.Properties
;
import
java.util.Properties
;
import
java.util.Vector
;
import
java.util.Vector
;
...
@@ -87,8 +87,9 @@ public abstract class TangibleApplication {
...
@@ -87,8 +87,9 @@ public abstract class TangibleApplication {
*
*
* @param newPropertiesFileURI
* @param newPropertiesFileURI
* The URI of the properties file to load.
* The URI of the properties file to load.
* @throws Exception
*/
*/
protected
TangibleApplication
(
@Nullable
String
newPropertiesFileURI
)
{
protected
TangibleApplication
(
@Nullable
String
newPropertiesFileURI
)
throws
Exception
{
if
(
newPropertiesFileURI
!=
null
&&
!
newPropertiesFileURI
.
isEmpty
())
{
if
(
newPropertiesFileURI
!=
null
&&
!
newPropertiesFileURI
.
isEmpty
())
{
propertiesFileURI
=
newPropertiesFileURI
;
propertiesFileURI
=
newPropertiesFileURI
;
}
}
...
@@ -104,14 +105,51 @@ public abstract class TangibleApplication {
...
@@ -104,14 +105,51 @@ public abstract class TangibleApplication {
interfaceManager
=
new
TangibleInterfaceManager
(
this
,
logger
,
properties
);
interfaceManager
=
new
TangibleInterfaceManager
(
this
,
logger
,
properties
);
adapter
=
new
TuioConcreteAdapter
(
interfaceManager
);
try
{
adapter
=
(
TuiAdapter
)
Class
.
forName
(
properties
.
getProperty
(
"tableAdapter"
)).
getConstructor
(
TangibleInterfaceManager
.
class
).
newInstance
(
interfaceManager
);
//$NON-NLS-1$
}
catch
(
InstantiationException
e
)
{
logger
.
log
(
Level
.
SEVERE
,
"Cannot instantiate adapter.\n"
//$NON-NLS-1$
+
"You try to instantiate an abstract class or an interface!"
);
//$NON-NLS-1$s
throw
new
Exception
(
"Cannot instantiate adapter\n"
//$NON-NLS-1$
+
"You try to instantiate an abstract class or an interface!"
,
e
);
//$NON-NLS-1$
}
catch
(
IllegalAccessException
e
)
{
logger
.
log
(
Level
.
SEVERE
,
"The currently executing method does not have access to the definition of the constructor."
);
//$NON-NLS-1$
throw
new
IllegalAccessException
(
"The currently executing method does not have access to the definition of the constructor."
);
//$NON-NLS-1$
}
catch
(
IllegalArgumentException
e
)
{
logger
.
log
(
Level
.
SEVERE
,
"A wrong argument has been passed to the adapter."
);
//$NON-NLS-1$
throw
new
Exception
(
"A wrong argument has been passed to the adapter.\n+"
//$NON-NLS-1$
+
"Required argument of type lu.list.itis.dkd.tui.TangibleInterfaceManager!"
,
e
);
//$NON-NLS-1$
}
catch
(
InvocationTargetException
e
)
{
logger
.
log
(
Level
.
SEVERE
,
"An exception has been thrown in the constructor of the adapter"
);
//$NON-NLS-1$
throw
new
InvocationTargetException
(
e
,
"Une exception a été jeté dans le constructeur de l'adaptateur.\n+"
//$NON-NLS-1$
+
"Check the constructor of "
+
properties
.
getProperty
(
"tableAdapter"
));
//$NON-NLS-1$ //$NON-NLS-2$
}
catch
(
NoSuchMethodException
e
)
{
logger
.
log
(
Level
.
SEVERE
,
"The called method was not found"
);
//$NON-NLS-1$
throw
new
NoSuchMethodException
(
"The called method was not found"
);
//$NON-NLS-1$
}
catch
(
SecurityException
e
)
{
logger
.
log
(
Level
.
SEVERE
,
"Security violation"
);
//$NON-NLS-1$
throw
new
Exception
(
"Security violation"
,
e
);
//$NON-NLS-1$
}
catch
(
ClassNotFoundException
e
)
{
logger
.
log
(
Level
.
SEVERE
,
"The class "
+
properties
.
getProperty
(
"tableAdapter"
)
+
"was not found."
);
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
throw
new
ClassNotFoundException
(
"The class "
+
properties
.
getProperty
(
"tableAdapter"
)
+
"was not found.\n"
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
"Check the spelling of your adapter class name in properties file."
);
//$NON-NLS-1$
}
GlobalContext
.
setGlobalContext
(
adapter
);
GlobalContext
.
setGlobalContext
(
adapter
);
IDMapper
.
initialise
(
properties
);
IDMapper
.
initialise
(
properties
);
EventLogger
.
getInstance
().
initialise
(
properties
);
EventLogger
.
getInstance
().
initialise
(
properties
);
}
}
/**
/**
* Method for configuring a {@link Logger} with several properties as given by the loader
* Method for configuring a {@link Logger} with several properties as given by the loader
* properties file.
* properties file.
...
...
TULIP/src/lu/list/itis/dkd/tui/adapter/Tuio
Concrete
Adapter.java
→
TULIP/src/lu/list/itis/dkd/tui/adapter/TuioAdapter.java
View file @
a09afead
...
@@ -42,7 +42,7 @@ import java.util.Vector;
...
@@ -42,7 +42,7 @@ import java.util.Vector;
* @version 2.0.1
* @version 2.0.1
*/
*/
@NonNullByDefault
@NonNullByDefault
public
class
Tuio
Concrete
Adapter
extends
TuiAdapter
implements
TuioListener
{
public
class
TuioAdapter
extends
TuiAdapter
implements
TuioListener
{
/**
/**
* A reference to the {@link TuioClient} conveying all TUIO protocol related messages and
* A reference to the {@link TuioClient} conveying all TUIO protocol related messages and
...
@@ -61,7 +61,7 @@ public class TuioConcreteAdapter extends TuiAdapter implements TuioListener {
...
@@ -61,7 +61,7 @@ public class TuioConcreteAdapter extends TuiAdapter implements TuioListener {
* @param interfaceManager
* @param interfaceManager
* The {@link TangibleInterfaceManager} display.
* The {@link TangibleInterfaceManager} display.
*/
*/
public
Tuio
Concrete
Adapter
(
TangibleInterfaceManager
interfaceManager
)
{
public
TuioAdapter
(
TangibleInterfaceManager
interfaceManager
)
{
super
(
interfaceManager
);
super
(
interfaceManager
);
}
}
...
...
TULIP/test/lu/list/itis/dkd/tui/TangibleApplicationTest.java
View file @
a09afead
...
@@ -62,19 +62,11 @@ public class TangibleApplicationTest {
...
@@ -62,19 +62,11 @@ public class TangibleApplicationTest {
* Test method for
* Test method for
* {@link lu.list.itis.dkd.tui.TangibleApplication#TangibleApplication(java.lang.String)}.
* {@link lu.list.itis.dkd.tui.TangibleApplication#TangibleApplication(java.lang.String)}.
*
*
* @throws SecurityException
* @throws Exception
* Thrown when a security manager is present and a discrepancy in the class loaders is
* detected or it denies access to the field.
* @throws NoSuchFieldException
* Thrown when the fields that this test wants to access do not exist.
* @throws IllegalAccessException
* Thrown when access to the field is not permitted.
* @throws IllegalArgumentException
* If the provided instance cannot give access to the field.
*/
*/
@SuppressWarnings
(
"javadoc"
)
@SuppressWarnings
(
"javadoc"
)
@Test
@Test
public
void
testTangibleApplication
()
throws
NoSuchFieldException
,
SecurityException
,
IllegalArgumentException
,
IllegalAccess
Exception
{
public
void
testTangibleApplication
()
throws
Exception
{
assertThat
(
application
,
is
(
not
(
nullValue
())));
assertThat
(
application
,
is
(
not
(
nullValue
())));
Field
properties
=
TestTangibleApplication
.
class
.
getSuperclass
().
getDeclaredField
(
"properties"
);
Field
properties
=
TestTangibleApplication
.
class
.
getSuperclass
().
getDeclaredField
(
"properties"
);
...
@@ -187,8 +179,9 @@ public class TangibleApplicationTest {
...
@@ -187,8 +179,9 @@ public class TangibleApplicationTest {
*
*
* @param newPropertiesFileURI
* @param newPropertiesFileURI
* The URI of the properties file to load.
* The URI of the properties file to load.
* @throws Exception
*/
*/
protected
TestTangibleApplication
(
String
newPropertiesFileURI
)
{
protected
TestTangibleApplication
(
String
newPropertiesFileURI
)
throws
Exception
{
super
(
newPropertiesFileURI
);
super
(
newPropertiesFileURI
);
}
}
}
}
...
...
TULIP/test/lu/list/itis/dkd/tui/TangibleInterfaceManagerTest.java
View file @
a09afead
...
@@ -40,8 +40,8 @@ import java.util.logging.Logger;
...
@@ -40,8 +40,8 @@ import java.util.logging.Logger;
* @version 1.0.2
* @version 1.0.2
*/
*/
public
class
TangibleInterfaceManagerTest
{
public
class
TangibleInterfaceManagerTest
{
private
String
propertiesLocation
=
"test_properties.properties"
;
private
String
propertiesLocation
=
"test_properties.properties"
;
private
TangibleApplication
application
;
private
TangibleApplication
application
;
private
TangibleInterfaceManager
interfaceManager
;
private
TangibleInterfaceManager
interfaceManager
;
...
@@ -175,8 +175,9 @@ public class TangibleInterfaceManagerTest {
...
@@ -175,8 +175,9 @@ public class TangibleInterfaceManagerTest {
*
*
* @param newPropertiesFileURI
* @param newPropertiesFileURI
* The URI of the properties file to load.
* The URI of the properties file to load.
* @throws Exception
*/
*/
protected
TestTangibleApplication
(
String
newPropertiesFileURI
)
{
protected
TestTangibleApplication
(
String
newPropertiesFileURI
)
throws
Exception
{
super
(
newPropertiesFileURI
);
super
(
newPropertiesFileURI
);
}
}
}
}
...
...
TULIP/test/lu/list/itis/dkd/tui/adapter/TangibleObjectTest.java
View file @
a09afead
...
@@ -71,8 +71,9 @@ public class TangibleObjectTest {
...
@@ -71,8 +71,9 @@ public class TangibleObjectTest {
*
*
* @param newPropertiesFileURI
* @param newPropertiesFileURI
* The URI of the properties file to load.
* The URI of the properties file to load.
* @throws Exception
*/
*/
protected
TestTangibleApplication
(
String
newPropertiesFileURI
)
{
protected
TestTangibleApplication
(
String
newPropertiesFileURI
)
throws
Exception
{
super
(
newPropertiesFileURI
);
super
(
newPropertiesFileURI
);
}
}
}
}
...
...
TULIP/test/lu/list/itis/dkd/tui/adapter/Tuio
Concrete
AdapterTest.java
→
TULIP/test/lu/list/itis/dkd/tui/adapter/TuioAdapterTest.java
View file @
a09afead
...
@@ -48,13 +48,13 @@ import java.util.Properties;
...
@@ -48,13 +48,13 @@ import java.util.Properties;
import
java.util.logging.Logger
;
import
java.util.logging.Logger
;
/**
/**
* Test case for testing the {@link Tuio
Concrete
Adapter} class.
* Test case for testing the {@link TuioAdapter} class.
*
*
* @author Nicolas GILMARD [nicolas.gilmard@list.lu]
* @author Nicolas GILMARD [nicolas.gilmard@list.lu]
* @since [1].[0]
* @since [1].[0]
* @version [1].[0].[1]
* @version [1].[0].[1]
*/
*/
public
class
Tuio
Concrete
AdapterTest
{
public
class
TuioAdapterTest
{
private
TuiAdapter
tuiAdapter
;
private
TuiAdapter
tuiAdapter
;
private
String
propertiesLocation
=
"test_properties.properties"
;
//$NON-NLS-1$
private
String
propertiesLocation
=
"test_properties.properties"
;
//$NON-NLS-1$
private
TangibleApplication
application
;
private
TangibleApplication
application
;
...
@@ -82,12 +82,12 @@ public class TuioConcreteAdapterTest {
...
@@ -82,12 +82,12 @@ public class TuioConcreteAdapterTest {
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
// nothing to do
// nothing to do
}
}
tuiAdapter
=
new
Tuio
Concrete
Adapter
(
new
TestTangibleInterfaceManager
(
application
,
null
,
temp
));
tuiAdapter
=
new
TuioAdapter
(
new
TestTangibleInterfaceManager
(
application
,
null
,
temp
));
}
}
/**
/**
* Test method for
* Test method for
* {@link lu.list.itis.dkd.tui.adapter.Tuio
Concrete
Adapter#TuioConcreteAdapter(lu.list.itis.dkd.tui.TangibleInterfaceManager)}
* {@link lu.list.itis.dkd.tui.adapter.TuioAdapter#TuioConcreteAdapter(lu.list.itis.dkd.tui.TangibleInterfaceManager)}
* .
* .
*
*
* @throws SecurityException
* @throws SecurityException
...
@@ -104,9 +104,9 @@ public class TuioConcreteAdapterTest {
...
@@ -104,9 +104,9 @@ public class TuioConcreteAdapterTest {
public
void
testTuioConcreteAdapter
()
throws
NoSuchFieldException
,
SecurityException
,
IllegalArgumentException
,
IllegalAccessException
{
public
void
testTuioConcreteAdapter
()
throws
NoSuchFieldException
,
SecurityException
,
IllegalArgumentException
,
IllegalAccessException
{
assertThat
(
tuiAdapter
,
is
(
notNullValue
()));
assertThat
(
tuiAdapter
,
is
(
notNullValue
()));
Field
interfaceManager
=
Tuio
Concrete
Adapter
.
class
.
getSuperclass
().
getDeclaredField
(
"interfaceManager"
);
//$NON-NLS-1$
Field
interfaceManager
=
TuioAdapter
.
class
.
getSuperclass
().
getDeclaredField
(
"interfaceManager"
);
//$NON-NLS-1$
Field
client
=
Tuio
Concrete
Adapter
.
class
.
getDeclaredField
(
"client"
);
//$NON-NLS-1$
Field
client
=
TuioAdapter
.
class
.
getDeclaredField
(
"client"
);
//$NON-NLS-1$
Field
objectManager
=
Tuio
Concrete
Adapter
.
class
.
getDeclaredField
(
"objectManager"
);
//$NON-NLS-1$
Field
objectManager
=
TuioAdapter
.
class
.
getDeclaredField
(
"objectManager"
);
//$NON-NLS-1$
interfaceManager
.
setAccessible
(
true
);
interfaceManager
.
setAccessible
(
true
);
assertThat
(
interfaceManager
.
get
(
tuiAdapter
),
is
(
not
(
nullValue
())));
assertThat
(
interfaceManager
.
get
(
tuiAdapter
),
is
(
not
(
nullValue
())));
...
@@ -132,8 +132,9 @@ public class TuioConcreteAdapterTest {
...
@@ -132,8 +132,9 @@ public class TuioConcreteAdapterTest {
*
*
* @param newPropertiesFileURI
* @param newPropertiesFileURI
* The URI of the properties file to load.
* The URI of the properties file to load.
* @throws Exception
*/
*/
protected
TestTangibleApplication
(
String
newPropertiesFileURI
)
{
protected
TestTangibleApplication
(
String
newPropertiesFileURI
)
throws
Exception
{
super
(
newPropertiesFileURI
);
super
(
newPropertiesFileURI
);
}
}
}
}
...
@@ -193,7 +194,7 @@ public class TuioConcreteAdapterTest {
...
@@ -193,7 +194,7 @@ public class TuioConcreteAdapterTest {
/**
/**
* Test method for {@link lu.list.itis.dkd.tui.adapter.Tuio
Concrete
Adapter#getObjectManager()}
* Test method for {@link lu.list.itis.dkd.tui.adapter.TuioAdapter#getObjectManager()}
*/
*/
@SuppressWarnings
(
"resource"
)
@SuppressWarnings
(
"resource"
)
@Test
@Test
...
@@ -226,7 +227,7 @@ public class TuioConcreteAdapterTest {
...
@@ -226,7 +227,7 @@ public class TuioConcreteAdapterTest {
/**
/**
* Test method for
* Test method for
* {@link lu.list.itis.dkd.tui.adapter.Tuio
Concrete
Adapter#setObjectManager(TangibleObjectManager)}
* {@link lu.list.itis.dkd.tui.adapter.TuioAdapter#setObjectManager(TangibleObjectManager)}
*/
*/
@SuppressWarnings
(
"resource"
)
@SuppressWarnings
(
"resource"
)
@Test
@Test
...
@@ -254,7 +255,7 @@ public class TuioConcreteAdapterTest {
...
@@ -254,7 +255,7 @@ public class TuioConcreteAdapterTest {
}
}
/**
/**
* Test method for {@link lu.list.itis.dkd.tui.adapter.Tuio
Concrete
Adapter#getActiveCursors()}
* Test method for {@link lu.list.itis.dkd.tui.adapter.TuioAdapter#getActiveCursors()}
*/
*/
@Test
@Test
public
void
testGetActiveCursors
()
{
public
void
testGetActiveCursors
()
{
...
@@ -262,7 +263,7 @@ public class TuioConcreteAdapterTest {
...
@@ -262,7 +263,7 @@ public class TuioConcreteAdapterTest {
}
}
/**
/**
* Test method for {@link lu.list.itis.dkd.tui.adapter.Tuio
Concrete
Adapter#getActiveObjects()}
* Test method for {@link lu.list.itis.dkd.tui.adapter.TuioAdapter#getActiveObjects()}
*/
*/
@Test
@Test
public
void
testGetActiveObjects
()
{
public
void
testGetActiveObjects
()
{
...
@@ -270,7 +271,7 @@ public class TuioConcreteAdapterTest {
...
@@ -270,7 +271,7 @@ public class TuioConcreteAdapterTest {
}
}
/**
/**
* Test method for {@link lu.list.itis.dkd.tui.adapter.Tuio
Concrete
Adapter#getCursor(long)}
* Test method for {@link lu.list.itis.dkd.tui.adapter.TuioAdapter#getCursor(long)}
*/
*/
@Test
@Test
public
void
testGetCursor
()
{
public
void
testGetCursor
()
{
...
@@ -285,7 +286,7 @@ public class TuioConcreteAdapterTest {
...
@@ -285,7 +286,7 @@ public class TuioConcreteAdapterTest {
}
}
/**
/**
* Test method for {@link lu.list.itis.dkd.tui.adapter.Tuio
Concrete
Adapter#getObject(long)}
* Test method for {@link lu.list.itis.dkd.tui.adapter.TuioAdapter#getObject(long)}
*/
*/
@Test
@Test
public
void
testGetObject
()
{
public
void
testGetObject
()
{
...
@@ -308,7 +309,7 @@ public class TuioConcreteAdapterTest {
...
@@ -308,7 +309,7 @@ public class TuioConcreteAdapterTest {
TuioCursor
tuioCursor
=
new
TuioCursor
(
1
,
3
,
10
f
,
11
f
);
TuioCursor
tuioCursor
=
new
TuioCursor
(
1
,
3
,
10
f
,
11
f
);
Method
convertTuioCursor
=
null
;
Method
convertTuioCursor
=
null
;
try
{
try
{
convertTuioCursor
=
Tuio
Concrete
Adapter
.
class
.
getDeclaredMethod
(
"convertTuioCursorToTangibleObject"
,
new
Class
[]
{
TuioCursor
.
class
});
//$NON-NLS-1$
convertTuioCursor
=
TuioAdapter
.
class
.
getDeclaredMethod
(
"convertTuioCursorToTangibleObject"
,
new
Class
[]
{
TuioCursor
.
class
});
//$NON-NLS-1$
}
catch
(
NoSuchMethodException
e
)
{
}
catch
(
NoSuchMethodException
e
)
{
// nothing to do
// nothing to do
}
catch
(
SecurityException
e
)
{
}
catch
(
SecurityException
e
)
{
...
@@ -354,7 +355,7 @@ public class TuioConcreteAdapterTest {
...
@@ -354,7 +355,7 @@ public class TuioConcreteAdapterTest {
Method
convertTuioObject
=
null
;
Method
convertTuioObject
=
null
;
try
{
try
{
convertTuioObject
=
Tuio
Concrete
Adapter
.
class
.
getDeclaredMethod
(
"convertTuioObjectToTangibleObject"
,
new
Class
[]
{
TuioObject
.
class
});
//$NON-NLS-1$
convertTuioObject
=
TuioAdapter
.
class
.
getDeclaredMethod
(
"convertTuioObjectToTangibleObject"
,
new
Class
[]
{
TuioObject
.
class
});
//$NON-NLS-1$
}
catch
(
NoSuchMethodException
e
)
{
}
catch
(
NoSuchMethodException
e
)
{
// nothing to do
// nothing to do
}
catch
(
SecurityException
e
)
{
}
catch
(
SecurityException
e
)
{
...
@@ -392,7 +393,7 @@ public class TuioConcreteAdapterTest {
...
@@ -392,7 +393,7 @@ public class TuioConcreteAdapterTest {
}
}
/**
/**
* Test method for {@link lu.list.itis.dkd.tui.adapter.Tuio
Concrete
Adapter#connect()}
* Test method for {@link lu.list.itis.dkd.tui.adapter.TuioAdapter#connect()}
*/
*/
@SuppressWarnings
(
"resource"
)
@SuppressWarnings
(
"resource"
)
@Test
@Test
...
@@ -418,24 +419,23 @@ public class TuioConcreteAdapterTest {
...
@@ -418,24 +419,23 @@ public class TuioConcreteAdapterTest {
assertEquals
(
testManager
,
tuiAdapter
.
getObjectManager
());
assertEquals
(
testManager
,
tuiAdapter
.
getObjectManager
());
/** not connected */
/** not connected */
assertEquals
(
false
,
((
Tuio
Concrete
Adapter
)
tuiAdapter
).
client
.
isConnected
());
assertEquals
(
false
,
((
TuioAdapter
)
tuiAdapter
).
client
.
isConnected
());
/** connect the application */
/** connect the application */
tuiAdapter
.
connect
();
tuiAdapter
.
connect
();
assertEquals
(
true
,
((
Tuio
Concrete
Adapter
)
tuiAdapter
).
client
.
isConnected
());
assertEquals
(
true
,
((
TuioAdapter
)
tuiAdapter
).
client
.
isConnected
());
}
}
/**
/**
* Test method for {@link lu.list.itis.dkd.tui.adapter.Tuio
Concrete
Adapter#disconnect()}
* Test method for {@link lu.list.itis.dkd.tui.adapter.TuioAdapter#disconnect()}
*/
*/
@Test
@Test
public
void
testDisconnect
()
{
public
void
testDisconnect
()
{
/** not connected */
/** not connected */
assertEquals
(
false
,
((
Tuio
Concrete
Adapter
)
tuiAdapter
).
client
.
isConnected
());
assertEquals
(
false
,
((
TuioAdapter
)
tuiAdapter
).
client
.
isConnected
());
}
}
/**
/**
* Test method for
* Test method for {@link lu.list.itis.dkd.tui.adapter.TuioAdapter#addTuioCursor(TuioCursor)}
* {@link lu.list.itis.dkd.tui.adapter.TuioConcreteAdapter#addTuioCursor(TuioCursor)}
*/
*/
@Test
@Test
public
void
testAddTuioCursor
()
{
public
void
testAddTuioCursor
()
{
...
@@ -443,8 +443,7 @@ public class TuioConcreteAdapterTest {
...
@@ -443,8 +443,7 @@ public class TuioConcreteAdapterTest {
}
}
/**
/**
* Test method for
* Test method for {@link lu.list.itis.dkd.tui.adapter.TuioAdapter#addTuioObject(TuioObject)}
* {@link lu.list.itis.dkd.tui.adapter.TuioConcreteAdapter#addTuioObject(TuioObject)}
*/
*/
@Test
@Test
public
void
testAddTuioObject
()
{
public
void
testAddTuioObject
()
{
...
@@ -452,7 +451,7 @@ public class TuioConcreteAdapterTest {
...
@@ -452,7 +451,7 @@ public class TuioConcreteAdapterTest {
}
}
/**
/**
* Test method for {@link lu.list.itis.dkd.tui.adapter.Tuio
Concrete
Adapter#refresh(TuioTime)}
* Test method for {@link lu.list.itis.dkd.tui.adapter.TuioAdapter#refresh(TuioTime)}
*/
*/
@Test
@Test
public
void
testRefresh
()
{
public
void
testRefresh
()
{
...
@@ -460,8 +459,7 @@ public class TuioConcreteAdapterTest {
...
@@ -460,8 +459,7 @@ public class TuioConcreteAdapterTest {
}
}
/**
/**
* Test method for
* Test method for {@link lu.list.itis.dkd.tui.adapter.TuioAdapter#removeTuioCursor(TuioCursor)}
* {@link lu.list.itis.dkd.tui.adapter.TuioConcreteAdapter#removeTuioCursor(TuioCursor)}
*/
*/
@Test
@Test
public
void
testRemoveTuioCursor
()
{
public
void
testRemoveTuioCursor
()
{
...
@@ -469,8 +467,7 @@ public class TuioConcreteAdapterTest {
...
@@ -469,8 +467,7 @@ public class TuioConcreteAdapterTest {
}
}
/**
/**
* Test method for
* Test method for {@link lu.list.itis.dkd.tui.adapter.TuioAdapter#removeTuioObject(TuioObject)}
* {@link lu.list.itis.dkd.tui.adapter.TuioConcreteAdapter#removeTuioObject(TuioObject)}
*/
*/
@Test
@Test
public
void
testRemoveTuioObject
()
{
public
void
testRemoveTuioObject
()
{
...
@@ -478,8 +475,7 @@ public class TuioConcreteAdapterTest {
...
@@ -478,8 +475,7 @@ public class TuioConcreteAdapterTest {
}
}
/**
/**
* Test method for
* Test method for {@link lu.list.itis.dkd.tui.adapter.TuioAdapter#updateTuioCursor(TuioCursor)}
* {@link lu.list.itis.dkd.tui.adapter.TuioConcreteAdapter#updateTuioCursor(TuioCursor)}
*/
*/
@Test
@Test
public
void
testUpdateTuioCursor
()
{
public
void
testUpdateTuioCursor
()
{
...
@@ -487,8 +483,7 @@ public class TuioConcreteAdapterTest {
...
@@ -487,8 +483,7 @@ public class TuioConcreteAdapterTest {
}
}
/**
/**
* Test method for
* Test method for {@link lu.list.itis.dkd.tui.adapter.TuioAdapter#updateTuioObject(TuioObject)}
* {@link lu.list.itis.dkd.tui.adapter.TuioConcreteAdapter#updateTuioObject(TuioObject)}
*/
*/
@Test
@Test
public
void
testUpdateTuioObject
()
{
public
void
testUpdateTuioObject
()
{
...
...
TULIP/test_properties.properties
View file @
a09afead
...
@@ -32,7 +32,8 @@ fontSize = 13
...
@@ -32,7 +32,8 @@ fontSize = 13
colour
=
BLACK
colour
=
BLACK
centred
=
false
centred
=
false
# Adapter to load
tableAdapter
=
tuio
#The value below is best left at or above 1024. It serves the purpose of cursor ID remapping.
#The value below is best left at or above 1024. It serves the purpose of cursor ID remapping.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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