From a6a3666c155126f9fe5e8dee01685d913de2fc01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Ple=C3=9F?= Date: Thu, 17 Apr 2014 19:03:45 +0200 Subject: [PATCH] moved code into package, added complete maven support for intellij UI Designer and JAR packaging --- healthdisplay/.idea/compiler.xml | 3 ++ .../.idea/libraries/Maven__asm_asm_3_0.xml | 13 +++++++ .../libraries/Maven__asm_asm_commons_3_0.xml | 13 +++++++ .../libraries/Maven__asm_asm_tree_3_0.xml | 13 +++++++ .../Maven__com_intellij_forms_rt_7_0_3.xml | 13 +++++++ .../Maven__com_jgoodies_forms_1_1_preview.xml | 13 +++++++ .../.idea/libraries/Maven__jdom_jdom_1_0.xml | 13 +++++++ healthdisplay/.idea/uiDesigner.xml | 2 +- healthdisplay/README | 5 +++ healthdisplay/healthdisplay.iml | 10 ++++- healthdisplay/pom.xml | 37 ++++++++++++++++++- .../java/de/psychose}/ActorDisplay.form | 2 +- .../java/de/psychose}/ActorDisplay.java | 17 +++++---- .../java/de/psychose}/ChaOSCclient.java | 2 + .../{ => main/java/de/psychose}/MainForm.form | 19 ++++++---- .../{ => main/java/de/psychose}/MainForm.java | 6 ++- .../{ => main/java/de/psychose}/Streamer.java | 2 + .../src/{ => main/java/de/psychose}/Test.java | 2 + 18 files changed, 164 insertions(+), 21 deletions(-) create mode 100644 healthdisplay/.idea/libraries/Maven__asm_asm_3_0.xml create mode 100644 healthdisplay/.idea/libraries/Maven__asm_asm_commons_3_0.xml create mode 100644 healthdisplay/.idea/libraries/Maven__asm_asm_tree_3_0.xml create mode 100644 healthdisplay/.idea/libraries/Maven__com_intellij_forms_rt_7_0_3.xml create mode 100644 healthdisplay/.idea/libraries/Maven__com_jgoodies_forms_1_1_preview.xml create mode 100644 healthdisplay/.idea/libraries/Maven__jdom_jdom_1_0.xml create mode 100644 healthdisplay/README rename healthdisplay/src/{ => main/java/de/psychose}/ActorDisplay.form (99%) rename healthdisplay/src/{ => main/java/de/psychose}/ActorDisplay.java (89%) rename healthdisplay/src/{ => main/java/de/psychose}/ChaOSCclient.java (99%) rename healthdisplay/src/{ => main/java/de/psychose}/MainForm.form (76%) rename healthdisplay/src/{ => main/java/de/psychose}/MainForm.java (95%) rename healthdisplay/src/{ => main/java/de/psychose}/Streamer.java (99%) rename healthdisplay/src/{ => main/java/de/psychose}/Test.java (99%) diff --git a/healthdisplay/.idea/compiler.xml b/healthdisplay/.idea/compiler.xml index fa7a277..2e11072 100644 --- a/healthdisplay/.idea/compiler.xml +++ b/healthdisplay/.idea/compiler.xml @@ -25,6 +25,9 @@ + + + diff --git a/healthdisplay/.idea/libraries/Maven__asm_asm_3_0.xml b/healthdisplay/.idea/libraries/Maven__asm_asm_3_0.xml new file mode 100644 index 0000000..7967610 --- /dev/null +++ b/healthdisplay/.idea/libraries/Maven__asm_asm_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/healthdisplay/.idea/libraries/Maven__asm_asm_commons_3_0.xml b/healthdisplay/.idea/libraries/Maven__asm_asm_commons_3_0.xml new file mode 100644 index 0000000..3cef17f --- /dev/null +++ b/healthdisplay/.idea/libraries/Maven__asm_asm_commons_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/healthdisplay/.idea/libraries/Maven__asm_asm_tree_3_0.xml b/healthdisplay/.idea/libraries/Maven__asm_asm_tree_3_0.xml new file mode 100644 index 0000000..967bfbd --- /dev/null +++ b/healthdisplay/.idea/libraries/Maven__asm_asm_tree_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/healthdisplay/.idea/libraries/Maven__com_intellij_forms_rt_7_0_3.xml b/healthdisplay/.idea/libraries/Maven__com_intellij_forms_rt_7_0_3.xml new file mode 100644 index 0000000..7c63da5 --- /dev/null +++ b/healthdisplay/.idea/libraries/Maven__com_intellij_forms_rt_7_0_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/healthdisplay/.idea/libraries/Maven__com_jgoodies_forms_1_1_preview.xml b/healthdisplay/.idea/libraries/Maven__com_jgoodies_forms_1_1_preview.xml new file mode 100644 index 0000000..230ff65 --- /dev/null +++ b/healthdisplay/.idea/libraries/Maven__com_jgoodies_forms_1_1_preview.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/healthdisplay/.idea/libraries/Maven__jdom_jdom_1_0.xml b/healthdisplay/.idea/libraries/Maven__jdom_jdom_1_0.xml new file mode 100644 index 0000000..3349d67 --- /dev/null +++ b/healthdisplay/.idea/libraries/Maven__jdom_jdom_1_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/healthdisplay/.idea/uiDesigner.xml b/healthdisplay/.idea/uiDesigner.xml index fbab987..9a015a0 100644 --- a/healthdisplay/.idea/uiDesigner.xml +++ b/healthdisplay/.idea/uiDesigner.xml @@ -119,7 +119,7 @@ - + diff --git a/healthdisplay/README b/healthdisplay/README new file mode 100644 index 0000000..4a3b245 --- /dev/null +++ b/healthdisplay/README @@ -0,0 +1,5 @@ + + +compile with + +mvn clean compile ideauidesigner:javac2 assembly:single diff --git a/healthdisplay/healthdisplay.iml b/healthdisplay/healthdisplay.iml index e6e4b05..8a76843 100644 --- a/healthdisplay/healthdisplay.iml +++ b/healthdisplay/healthdisplay.iml @@ -1,16 +1,22 @@ - + - + + + + + + + diff --git a/healthdisplay/pom.xml b/healthdisplay/pom.xml index 281e1a1..30de015 100644 --- a/healthdisplay/pom.xml +++ b/healthdisplay/pom.xml @@ -20,6 +20,12 @@ netty 3.2.7.Final + + com.intellij + forms_rt + 7.0.3 + + @@ -36,14 +42,23 @@ - + + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + 1.7 + 1.7 + UTF-8 + + maven-assembly-plugin - MainForm + de.psychose.MainForm @@ -51,6 +66,24 @@ + + org.codehaus.mojo + ideauidesigner-maven-plugin + + + + javac2 + + + + + + true + true + true + + + diff --git a/healthdisplay/src/ActorDisplay.form b/healthdisplay/src/main/java/de/psychose/ActorDisplay.form similarity index 99% rename from healthdisplay/src/ActorDisplay.form rename to healthdisplay/src/main/java/de/psychose/ActorDisplay.form index 37cd41b..f990072 100644 --- a/healthdisplay/src/ActorDisplay.form +++ b/healthdisplay/src/main/java/de/psychose/ActorDisplay.form @@ -1,5 +1,5 @@ -
+ diff --git a/healthdisplay/src/ActorDisplay.java b/healthdisplay/src/main/java/de/psychose/ActorDisplay.java similarity index 89% rename from healthdisplay/src/ActorDisplay.java rename to healthdisplay/src/main/java/de/psychose/ActorDisplay.java index e5a8637..542cd83 100644 --- a/healthdisplay/src/ActorDisplay.java +++ b/healthdisplay/src/main/java/de/psychose/ActorDisplay.java @@ -1,3 +1,5 @@ +package de.psychose; + import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; @@ -79,43 +81,43 @@ public class ActorDisplay { // actorPanel.setBackground(new Color(r.nextInt(), false)); - if(++counterTemperature > timeout) { + if (++counterTemperature > timeout) { lblTemperature.setForeground(offColor); } else { lblTemperature.setForeground(onColor); } - if(++counterPulse > timeout) { + if (++counterPulse > timeout) { lblPulse.setForeground(offColor); } else { lblPulse.setForeground(onColor); } - if(++counterOxy > timeout) { + if (++counterOxy > timeout) { lblOxy.setForeground(offColor); } else { lblOxy.setForeground(onColor); } - if(++counterEkg > timeout) { + if (++counterEkg > timeout) { lblEkg.setForeground(offColor); } else { lblEkg.setForeground(onColor); } - if(++counterEmg > timeout) { + if (++counterEmg > timeout) { lblEmg.setForeground(offColor); } else { lblEmg.setForeground(onColor); } - if(++counterHeartbeat > timeout) { + if (++counterHeartbeat > timeout) { lblHeartbeat.setForeground(offColor); } else { lblHeartbeat.setForeground(onColor); } - if(++counterBreath > timeout) { + if (++counterBreath > timeout) { lblBreath.setForeground(offColor); } else { lblBreath.setForeground(onColor); @@ -126,5 +128,6 @@ public class ActorDisplay { timer.setRepeats(true); timer.start(); } + } diff --git a/healthdisplay/src/ChaOSCclient.java b/healthdisplay/src/main/java/de/psychose/ChaOSCclient.java similarity index 99% rename from healthdisplay/src/ChaOSCclient.java rename to healthdisplay/src/main/java/de/psychose/ChaOSCclient.java index a277421..18135a1 100644 --- a/healthdisplay/src/ChaOSCclient.java +++ b/healthdisplay/src/main/java/de/psychose/ChaOSCclient.java @@ -1,3 +1,5 @@ +package de.psychose; + import com.illposed.osc.OSCListener; import com.illposed.osc.OSCMessage; import com.illposed.osc.OSCPortIn; diff --git a/healthdisplay/src/MainForm.form b/healthdisplay/src/main/java/de/psychose/MainForm.form similarity index 76% rename from healthdisplay/src/MainForm.form rename to healthdisplay/src/main/java/de/psychose/MainForm.form index aa1bed6..a90c6e9 100644 --- a/healthdisplay/src/MainForm.form +++ b/healthdisplay/src/main/java/de/psychose/MainForm.form @@ -1,6 +1,6 @@ - - + + @@ -19,27 +19,32 @@ - + + + + + + - + - + - + - + diff --git a/healthdisplay/src/MainForm.java b/healthdisplay/src/main/java/de/psychose/MainForm.java similarity index 95% rename from healthdisplay/src/MainForm.java rename to healthdisplay/src/main/java/de/psychose/MainForm.java index 2db7409..729b905 100644 --- a/healthdisplay/src/MainForm.java +++ b/healthdisplay/src/main/java/de/psychose/MainForm.java @@ -1,3 +1,5 @@ +package de.psychose; + import com.illposed.osc.OSCListener; import com.illposed.osc.OSCMessage; @@ -82,8 +84,10 @@ public class MainForm { public static void main(String[] args) { + String host = args.length > 0 ? args[0] : "chaosc"; + try { - final ChaOSCclient chaOSCclient = new ChaOSCclient("chaosc", 7110); + final ChaOSCclient chaOSCclient = new ChaOSCclient(host, 7110); final MainForm mainForm = new MainForm(chaOSCclient); final JFrame frame = new JFrame("MainForm"); diff --git a/healthdisplay/src/Streamer.java b/healthdisplay/src/main/java/de/psychose/Streamer.java similarity index 99% rename from healthdisplay/src/Streamer.java rename to healthdisplay/src/main/java/de/psychose/Streamer.java index 1796b55..deea16a 100644 --- a/healthdisplay/src/Streamer.java +++ b/healthdisplay/src/main/java/de/psychose/Streamer.java @@ -1,3 +1,5 @@ +package de.psychose; + import org.jboss.netty.bootstrap.ServerBootstrap; import org.jboss.netty.buffer.ChannelBuffers; import org.jboss.netty.channel.*; diff --git a/healthdisplay/src/Test.java b/healthdisplay/src/main/java/de/psychose/Test.java similarity index 99% rename from healthdisplay/src/Test.java rename to healthdisplay/src/main/java/de/psychose/Test.java index c4ea4d4..9c38158 100644 --- a/healthdisplay/src/Test.java +++ b/healthdisplay/src/main/java/de/psychose/Test.java @@ -1,3 +1,5 @@ +package de.psychose; + import javax.sound.midi.*; import java.io.File; import java.util.HashSet;