Commit bbd187e6 authored by Nico Mack's avatar Nico Mack

Refactoring of support file into dedicated resources package

parent 667e12b3
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding="**" kind="src" output="target/classes" path="config">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/classes" path="src">
<classpathentry kind="src" path="src">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
......@@ -13,9 +8,9 @@
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="test">
<attributes>
<attribute name="test" value="true"/>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="resources"/>
......
eclipse.preferences.version=1
encoding/<project>=UTF-8
encoding/config=UTF-8
encoding/src=UTF-8
encoding/test=UTF-8
<?xml version="1.0" encoding="UTF-8"?>
<tangibles>
<objects>
<object>
<type>BaseWidget</type>
<coronas>
<corona>
<type>Shadow</type>
<centre>
<x>0</x>
<y>0</y>
<z>0</z>
</centre>
</corona>
</coronas>
<name>Marty</name>
<definingShape>Circle</definingShape>
<networkAdapter></networkAdapter>
</object>
</objects>
<cursors>
<cursor>
<type></type>
<coronas>
<corona></corona>
</coronas>
<name></name>
<defining-shape></defining-shape>
<network-adapter></network-adapter>
</cursor>
</cursors>
<blobs>
<blob>
<type></type>
<coronas>
<corona></corona>
</coronas>
<name></name>
<defining-shape></defining-shape>
<network-adapter></network-adapter>
</blob>
</blobs>
</tangibles>
<!-- Font: http://docs.oracle.com/javase/1.5.0/docs/api/java/awt/Font.html#decode%28java.lang.String%29 -->
# Properties for the Logger
logger.event.output.location = log.txt
logger.event.output.enabled = false
logger.level = ALL
logger.event.configuration = logger.xml
# Widget IDs to be mapped
# Properties for calibrating the interface
frameTitle = NUI Application
windowWidth = 1280
windowHeight = 800
fullScreen = false
font = Arial
fontSize = 13
colour = BLACK
centred = false
# Properties for the calibration of the object manager
#The value below is best left at or above 1024
cursor.id.remapping.constant = 1024
# The low-level computer vision (or similar) adapter to load.
# Syntax is : adapter.class = packageName.ClassName
adapter.class = lu.list.itis.dkd.tui.adapter.TuioAdapter
# The location and name of the root bootstrapping file.
bootstrapping.root = config/bootstrapping.xml
\ No newline at end of file
imerFreq=1000
frameTitle=NUI Application
zoomWidgetID=0
logger.event.configuration=logger.xml
fontSize=13
backgroundWidgetID=2
recenterWidgetID=23
logger.event.output.location=test_log.txt
calibrationFileURI=calibration.xml
infoWidgetID=1
windowHeight=800
colour=BLACK
fullScreen=false
zoomTimerFreq=1000
contentFileURI=contentLAMILO.xml
infoTimerFreq=600
centeredLuxembourg=false
font=Arial
splitWidgetID=22
logger.event.output.enabled=false
calibrationMode=false
legendScale=0.8
centred=false
windowWidth=1280
logger.level=FINE
cursor.id.remapping.constant=2048
# The low-level computer vision (or similar) adapter to load.
# Syntax is : adapter.class = packageName.ClassName
adapter.class = lu.list.itis.dkd.tui.adapter.TuioAdapter
\ No newline at end of file
......@@ -102,6 +102,14 @@
<manifest>
<mainClass>lu.list.itis.dkd.tui.TulipCore</mainClass>
</manifest>
<manifestEntries>
<implementation-version>${project.version}</implementation-version>
<implementation-build>${buildNumber}</implementation-build>
<build-date>${build.date}</build-date>
</manifestEntries>
<manifest>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
......@@ -161,7 +169,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.26</version>
<version>1.7.30</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
......@@ -304,7 +312,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<log4j.version>2.12.0</log4j.version>
<log4j.version>2.13.3</log4j.version>
<xerces2j.version>2.12.0</xerces2j.version>
</properties>
......
......@@ -122,9 +122,9 @@ public class TangibleInterfaceManager extends Stage {
protected static final Logger LOGGER = LoggerFactory.getLogger(TangibleInterfaceManager.class.getSimpleName());
private static final String ABOUT_HTML_TEMPLATE = "/about.html"; //$NON-NLS-1$
private static final String HELP_HTML_TEMPLATE = "/calibration_help.html"; //$NON-NLS-1$
private static final String PACKAGE_HTML_TEMPLATE = "/tulip_package.html"; //$NON-NLS-1$
private static final String ABOUT_HTML_TEMPLATE = "lu/list/itis/dkd/tui/html/about.html"; //$NON-NLS-1$
private static final String HELP_HTML_TEMPLATE = "lu/list/itis/dkd/tui/html/calibration_help.html"; //$NON-NLS-1$
private static final String PACKAGE_HTML_TEMPLATE = "lu/list/itis/dkd/tui/html/tulip_package.html"; //$NON-NLS-1$
private static final Pattern VARIABLE_PATTERN = Pattern.compile("\\$\\{([a-z0-9\\-_]+)\\}", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
// private static final Pattern URI_PATTERN = Pattern.compile("^file:(.*?)$",
// Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
......@@ -209,7 +209,7 @@ public class TangibleInterfaceManager extends Stage {
String html = null;
if ((templatePath != null) && !templatePath.isEmpty()) {
try (Reader templateReader = new InputStreamReader(TangibleInterfaceManager.class.getResourceAsStream(templatePath))) {
try (Reader templateReader = new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(templatePath))) {
html = IOUtils.toString(templateReader);
} catch (IOException e) {
LOGGER.warn("Error while reading HTML template {}!", templatePath, e); //$NON-NLS-1$
......@@ -308,7 +308,7 @@ public class TangibleInterfaceManager extends Stage {
private String renderHelp() {
Map<String, Object> helpFields = new HashMap<>();
helpFields.put("AssetsURL", this.getClass().getResource("/assets"));
helpFields.put("AssetsURL", this.getClass().getResource("/lu/list/itis/dkd/tui/html/assets")); //$NON-NLS-1$//$NON-NLS-2$
String helpTemplate = this.readHtmlTemplate(HELP_HTML_TEMPLATE);
return (this.renderTemplate(helpTemplate, helpFields));
......@@ -483,8 +483,8 @@ public class TangibleInterfaceManager extends Stage {
// ---------------------------------------------------------------------------
/**
* Method to be called after changing calibration values. This method will require overriding in any
* subclass if the default behaviour, doing nothing, requires changing.
* Method to be called after changing calibration values. This method will require overriding in
* any subclass if the default behaviour, doing nothing, requires changing.
*/
// ---------------------------------------------------------------------------
......
......@@ -31,7 +31,7 @@ import org.eclipse.osgi.util.NLS;
*/
@SuppressWarnings({"javadoc", "squid:S3008"})
public class Signature extends NLS {
private static final String BUNDLE_NAME = "signature"; //$NON-NLS-1$
private static final String BUNDLE_NAME = "lu.list.itis.dkd.tui.properties.signature"; //$NON-NLS-1$
public static String UNDEFINED;
......
......@@ -31,7 +31,7 @@ import org.eclipse.osgi.util.NLS;
*/
@SuppressWarnings({"javadoc", "squid:S3008"})
public class About extends NLS {
private static final String BUNDLE_NAME = "about"; //$NON-NLS-1$
private static final String BUNDLE_NAME = "lu.list.itis.dkd.tui.properties.about"; //$NON-NLS-1$
public static String BUILD_DATE;
public static String BUILD_NUMBER;
......@@ -48,5 +48,6 @@ public class About extends NLS {
NLS.initializeMessages(BUNDLE_NAME, About.class);
}
private About() {}
private About() {
}
}
\ No newline at end of file
......@@ -78,7 +78,7 @@ public class CalibrationScreen extends JPanel implements KeyListener {
private static final long serialVersionUID = 1L;
private static final String CALIBRATION_STLES = "calibrationStyles.properties"; //$NON-NLS-1$
private static final String CALIBRATION_STYLES = "lu/list/itis/dkd/tui/properties/calibrationStyles.properties"; //$NON-NLS-1$
private static final String TOPLEFT_ICON = "resources/TopLeft.png"; //$NON-NLS-1$
private static final String BOTTOMRIGHT_ICON = "resources/BottomRight.png"; //$NON-NLS-1$
......@@ -146,7 +146,7 @@ public class CalibrationScreen extends JPanel implements KeyListener {
HTMLEditorKit htmlEditor = new HTMLEditorKit();
StyleSheet stylesheet = htmlEditor.getStyleSheet();
stylesheet = StyleSheetReader.populateStyleSheet(stylesheet, CALIBRATION_STLES);
stylesheet = StyleSheetReader.populateStyleSheet(stylesheet, CALIBRATION_STYLES);
help = new JEditorPane();
help.setContentType("text/html"); //$NON-NLS-1$
......@@ -386,15 +386,15 @@ public class CalibrationScreen extends JPanel implements KeyListener {
// ---------------------------------------------------------------------------
/**
* This method is called when the application is in calibration mode. In this case the grey overlay
* of widgets is drawn as well as two rectangles showing the current calibration values:
* This method is called when the application is in calibration mode. In this case the grey
* overlay of widgets is drawn as well as two rectangles showing the current calibration values:
*
* <ul>
* <li>A white rectangle (i.e., white fill) on a red background shows the area of the screen that is
* projected on the tabletop. This can be used to crop areas of the projector that are larger than
* the tabletop surface.</li>
* <li>A rectangle with a black border shows the outlines of the area seen by the camera. This can
* be modified to align the grey overlays with the physical objects.</li>
* <li>A white rectangle (i.e., white fill) on a red background shows the area of the screen
* that is projected on the tabletop. This can be used to crop areas of the projector that are
* larger than the tabletop surface.</li>
* <li>A rectangle with a black border shows the outlines of the area seen by the camera. This
* can be modified to align the grey overlays with the physical objects.</li>
* </ul>
*
* @param canvas
......
......@@ -31,7 +31,7 @@ import org.eclipse.osgi.util.NLS;
*/
@SuppressWarnings({"javadoc", "squid:S3008"})
public class Externalization extends NLS {
private static final String BUNDLE_NAME = "externalization"; //$NON-NLS-1$
private static final String BUNDLE_NAME = "lu.list.itis.dkd.tui.properties.externalization"; //$NON-NLS-1$
// --- A ---
......
......@@ -31,7 +31,7 @@ import org.eclipse.osgi.util.NLS;
*/
@SuppressWarnings({"javadoc", "squid:S3008"})
public class MimeType extends NLS {
private static final String BUNDLE_NAME = "mime"; //$NON-NLS-1$
private static final String BUNDLE_NAME = "lu.list.itis.dkd.tui.properties.mime"; //$NON-NLS-1$
public static String AUDIO_MPEG;
......@@ -40,5 +40,6 @@ public class MimeType extends NLS {
NLS.initializeMessages(BUNDLE_NAME, MimeType.class);
}
private MimeType() {}
private MimeType() {
}
}
\ No newline at end of file
......@@ -72,7 +72,7 @@ public class SplashScreen extends JPanel implements LogListener {
private static final Logger LOGGER = LoggerFactory.getLogger(SplashScreen.class.getSimpleName());
private static final String ABOUT_STLES = "aboutStyles.properties"; //$NON-NLS-1$
private static final String ABOUT_STYLES = "lu/list/itis/dkd/tui/properties/aboutStyles.properties"; //$NON-NLS-1$
private static final String LOGO_PATH = "resources/TULIP.png"; //$NON-NLS-1$
private static final String COLUMN_SPECS = "5dlu, left:pref, 50dlu, 100dlu:grow, 5dlu"; //$NON-NLS-1$
private static final String ROW_SPECS = "5dlu, center:300dlu, 5dlu, top:pref:grow,5dlu"; //$NON-NLS-1$
......@@ -122,7 +122,7 @@ public class SplashScreen extends JPanel implements LogListener {
HTMLEditorKit htmlEditor = new HTMLEditorKit();
StyleSheet stylesheet = htmlEditor.getStyleSheet();
stylesheet = StyleSheetReader.populateStyleSheet(stylesheet, ABOUT_STLES);
stylesheet = StyleSheetReader.populateStyleSheet(stylesheet, ABOUT_STYLES);
about = new JEditorPane();
about.setContentType("text/html"); //$NON-NLS-1$
......
......@@ -4,7 +4,7 @@ import org.eclipse.osgi.util.NLS;
@SuppressWarnings({"javadoc", "squid:S3008"})
public class Templating extends NLS {
private static final String BUNDLE_NAME = "templating"; //$NON-NLS-1$
private static final String BUNDLE_NAME = "lu.list.itis.dkd.tui.properties.templating"; //$NON-NLS-1$
public static String HANDLE_ID_PROPERTY;
......@@ -34,5 +34,6 @@ public class Templating extends NLS {
NLS.initializeMessages(BUNDLE_NAME, Templating.class);
}
private Templating() {}
private Templating() {
}
}
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