Browse files

many changes, shoring up for deploy

  • Loading branch information...
1 parent ad94a5e commit b0aebae178241ac4297847a9c2a0dfa5f0862862 @zk committed Feb 12, 2009
View
109 neurons
@@ -2,15 +2,28 @@
<list>
<napplelabs.dbssim.neuron.NeuronPathRep>
<color>
+ <red>0</red>
+ <green>0</green>
+ <blue>255</blue>
+ <alpha>255</alpha>
+ </color>
+ <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/7-PD-gpi.wav</mediaFile>
+ <location class="java.awt.geom.Point2D$Double">
+ <x>149.156296559687</x>
+ <y>-518.6706042430462</y>
+ </location>
+ </napplelabs.dbssim.neuron.NeuronPathRep>
+ <napplelabs.dbssim.neuron.NeuronPathRep>
+ <color>
<red>255</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</color>
<mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/10-PD-STN.wav</mediaFile>
<location class="java.awt.geom.Point2D$Double">
- <x>-40.381741228065515</x>
- <y>69.91448588633693</y>
+ <x>48.440042696381255</x>
+ <y>-274.1571471322358</y>
</location>
</napplelabs.dbssim.neuron.NeuronPathRep>
<napplelabs.dbssim.neuron.NeuronPathRep>
@@ -22,79 +35,93 @@
</color>
<mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/15-PD-SNr.wav</mediaFile>
<location class="java.awt.geom.Point2D$Double">
- <x>-87.55722748949846</x>
- <y>240.17168246849485</y>
+ <x>-44.27360294261013</x>
+ <y>197.3131439735921</y>
</location>
</napplelabs.dbssim.neuron.NeuronPathRep>
<napplelabs.dbssim.neuron.NeuronPathRep>
- <color>
- <red>0</red>
- <green>0</green>
- <blue>255</blue>
- <alpha>255</alpha>
- </color>
- <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/Rage Against The Machine - rage against the machine - 06 - Know Your Enemy.mp3</mediaFile>
+ <color reference="../../napplelabs.dbssim.neuron.NeuronPathRep/color"/>
+ <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/7-PD-gpi.wav</mediaFile>
<location class="java.awt.geom.Point2D$Double">
- <x>167.55631517543904</x>
- <y>-599.3659360452199</y>
+ <x>141.07125414265573</x>
+ <y>-604.7039157066074</y>
</location>
</napplelabs.dbssim.neuron.NeuronPathRep>
<napplelabs.dbssim.neuron.NeuronPathRep>
- <color>
- <red>255</red>
- <green>0</green>
- <blue>0</blue>
- <alpha>255</alpha>
- </color>
- <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/10-PD-STN.wav</mediaFile>
+ <color reference="../../napplelabs.dbssim.neuron.NeuronPathRep/color"/>
+ <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/7-PD-gpi.wav</mediaFile>
<location class="java.awt.geom.Point2D$Double">
- <x>-12.719061499187925</x>
- <y>-6.410737685078022</y>
+ <x>187.92401863138156</x>
+ <y>-764.5665917980033</y>
</location>
</napplelabs.dbssim.neuron.NeuronPathRep>
<napplelabs.dbssim.neuron.NeuronPathRep>
- <color reference="../../napplelabs.dbssim.neuron.NeuronPathRep[4]/color"/>
+ <color reference="../../napplelabs.dbssim.neuron.NeuronPathRep[2]/color"/>
<mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/10-PD-STN.wav</mediaFile>
<location class="java.awt.geom.Point2D$Double">
- <x>27.39323010435001</x>
- <y>-75.56104274484736</y>
+ <x>118.52850025973265</x>
+ <y>-340.22120567130736</y>
</location>
</napplelabs.dbssim.neuron.NeuronPathRep>
<napplelabs.dbssim.neuron.NeuronPathRep>
- <color reference="../../napplelabs.dbssim.neuron.NeuronPathRep[4]/color"/>
- <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/10-PD-STN.wav</mediaFile>
+ <color reference="../../napplelabs.dbssim.neuron.NeuronPathRep[3]/color"/>
+ <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/15-PD-SNr.wav</mediaFile>
<location class="java.awt.geom.Point2D$Double">
- <x>95.91906868857167</x>
- <y>-282.4877549487037</y>
+ <x>-50.51388565140224</x>
+ <y>136.1367638786892</y>
</location>
</napplelabs.dbssim.neuron.NeuronPathRep>
<napplelabs.dbssim.neuron.NeuronPathRep>
- <color reference="../../napplelabs.dbssim.neuron.NeuronPathRep[4]/color"/>
- <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/10-PD-STN.wav</mediaFile>
+ <color reference="../../napplelabs.dbssim.neuron.NeuronPathRep/color"/>
+ <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/7-PD-gpi.wav</mediaFile>
<location class="java.awt.geom.Point2D$Double">
- <x>91.23789516925832</x>
- <y>-360.2304966360077</y>
+ <x>201.99041954260412</x>
+ <y>-668.9987893152154</y>
</location>
</napplelabs.dbssim.neuron.NeuronPathRep>
<napplelabs.dbssim.neuron.NeuronPathRep>
- <color reference="../../napplelabs.dbssim.neuron.NeuronPathRep[4]/color"/>
+ <color reference="../../napplelabs.dbssim.neuron.NeuronPathRep[2]/color"/>
<mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/10-PD-STN.wav</mediaFile>
<location class="java.awt.geom.Point2D$Double">
- <x>104.6663094542826</x>
- <y>-446.57941097229025</y>
+ <x>94.75919774223057</x>
+ <y>-407.13689587633286</y>
</location>
</napplelabs.dbssim.neuron.NeuronPathRep>
<napplelabs.dbssim.neuron.NeuronPathRep>
<color>
- <red>0</red>
- <green>255</green>
+ <red>255</red>
+ <green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</color>
- <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/15-PD-SNr.wav</mediaFile>
+ <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/10-PD-STN.wav</mediaFile>
+ <location class="java.awt.geom.Point2D$Double">
+ <x>31.024171333051314</x>
+ <y>-58.087158560243125</y>
+ </location>
+ </napplelabs.dbssim.neuron.NeuronPathRep>
+ <napplelabs.dbssim.neuron.NeuronPathRep>
+ <color reference="../../napplelabs.dbssim.neuron.NeuronPathRep[10]/color"/>
+ <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/10-PD-STN.wav</mediaFile>
+ <location class="java.awt.geom.Point2D$Double">
+ <x>18.30271291016822</x>
+ <y>-143.45691658991515</y>
+ </location>
+ </napplelabs.dbssim.neuron.NeuronPathRep>
+ <napplelabs.dbssim.neuron.NeuronPathRep>
+ <color reference="../../napplelabs.dbssim.neuron.NeuronPathRep[10]/color"/>
+ <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/10-PD-STN.wav</mediaFile>
+ <location class="java.awt.geom.Point2D$Double">
+ <x>85.3331976183333</x>
+ <y>-184.81615183537872</y>
+ </location>
+ </napplelabs.dbssim.neuron.NeuronPathRep>
+ <napplelabs.dbssim.neuron.NeuronPathRep>
+ <color reference="../../napplelabs.dbssim.neuron.NeuronPathRep[10]/color"/>
+ <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/10-PD-STN.wav</mediaFile>
<location class="java.awt.geom.Point2D$Double">
- <x>-59.57757863826585</x>
- <y>309.33484390155263</y>
+ <x>-27.94880723462001</x>
+ <y>23.002194025688002</y>
</location>
</napplelabs.dbssim.neuron.NeuronPathRep>
</list>
View
156 neurons__
@@ -0,0 +1,156 @@
+<object-stream>
+ <list>
+ <napplelabs.dbssim.neuron.NeuronPathRep>
+ <color>
+ <red>255</red>
+ <green>0</green>
+ <blue>0</blue>
+ <alpha>255</alpha>
+ </color>
+ <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/10-PD-STN.wav</mediaFile>
+ <location class="java.awt.geom.Point2D$Double">
+ <x>-40.381741228065515</x>
+ <y>69.91448588633693</y>
+ </location>
+ </napplelabs.dbssim.neuron.NeuronPathRep>
+ <napplelabs.dbssim.neuron.NeuronPathRep>
+ <color>
+ <red>0</red>
+ <green>255</green>
+ <blue>0</blue>
+ <alpha>255</alpha>
+ </color>
+ <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/15-PD-SNr.wav</mediaFile>
+ <location class="java.awt.geom.Point2D$Double">
+ <x>-87.55722748949846</x>
+ <y>240.17168246849485</y>
+ </location>
+ </napplelabs.dbssim.neuron.NeuronPathRep>
+ <napplelabs.dbssim.neuron.NeuronPathRep>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>255</blue>
+ <alpha>255</alpha>
+ </color>
+ <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/7-PD-gpi.wav</mediaFile>
+ <location class="java.awt.geom.Point2D$Double">
+ <x>196.81666257221764</x>
+ <y>-622.7742139626431</y>
+ </location>
+ </napplelabs.dbssim.neuron.NeuronPathRep>
+ <napplelabs.dbssim.neuron.NeuronPathRep>
+ <color>
+ <red>255</red>
+ <green>0</green>
+ <blue>0</blue>
+ <alpha>255</alpha>
+ </color>
+ <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/10-PD-STN.wav</mediaFile>
+ <location class="java.awt.geom.Point2D$Double">
+ <x>-12.719061499187925</x>
+ <y>-6.410737685078022</y>
+ </location>
+ </napplelabs.dbssim.neuron.NeuronPathRep>
+ <napplelabs.dbssim.neuron.NeuronPathRep>
+ <color reference="../../napplelabs.dbssim.neuron.NeuronPathRep[4]/color"/>
+ <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/10-PD-STN.wav</mediaFile>
+ <location class="java.awt.geom.Point2D$Double">
+ <x>27.39323010435001</x>
+ <y>-75.56104274484736</y>
+ </location>
+ </napplelabs.dbssim.neuron.NeuronPathRep>
+ <napplelabs.dbssim.neuron.NeuronPathRep>
+ <color reference="../../napplelabs.dbssim.neuron.NeuronPathRep[4]/color"/>
+ <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/10-PD-STN.wav</mediaFile>
+ <location class="java.awt.geom.Point2D$Double">
+ <x>95.91906868857167</x>
+ <y>-282.4877549487037</y>
+ </location>
+ </napplelabs.dbssim.neuron.NeuronPathRep>
+ <napplelabs.dbssim.neuron.NeuronPathRep>
+ <color reference="../../napplelabs.dbssim.neuron.NeuronPathRep[4]/color"/>
+ <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/10-PD-STN.wav</mediaFile>
+ <location class="java.awt.geom.Point2D$Double">
+ <x>91.23789516925832</x>
+ <y>-360.2304966360077</y>
+ </location>
+ </napplelabs.dbssim.neuron.NeuronPathRep>
+ <napplelabs.dbssim.neuron.NeuronPathRep>
+ <color reference="../../napplelabs.dbssim.neuron.NeuronPathRep[4]/color"/>
+ <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/10-PD-STN.wav</mediaFile>
+ <location class="java.awt.geom.Point2D$Double">
+ <x>104.6663094542826</x>
+ <y>-446.57941097229025</y>
+ </location>
+ </napplelabs.dbssim.neuron.NeuronPathRep>
+ <napplelabs.dbssim.neuron.NeuronPathRep>
+ <color>
+ <red>0</red>
+ <green>255</green>
+ <blue>0</blue>
+ <alpha>255</alpha>
+ </color>
+ <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/15-PD-SNr.wav</mediaFile>
+ <location class="java.awt.geom.Point2D$Double">
+ <x>-59.57757863826585</x>
+ <y>309.33484390155263</y>
+ </location>
+ </napplelabs.dbssim.neuron.NeuronPathRep>
+ <napplelabs.dbssim.neuron.NeuronPathRep>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>255</blue>
+ <alpha>255</alpha>
+ </color>
+ <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/7-PD-gpi.wav</mediaFile>
+ <location class="java.awt.geom.Point2D$Double">
+ <x>259.71587043369465</x>
+ <y>-896.5589740205442</y>
+ </location>
+ </napplelabs.dbssim.neuron.NeuronPathRep>
+ <napplelabs.dbssim.neuron.NeuronPathRep>
+ <color reference="../../napplelabs.dbssim.neuron.NeuronPathRep[10]/color"/>
+ <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/7-PD-gpi.wav</mediaFile>
+ <location class="java.awt.geom.Point2D$Double">
+ <x>234.44727450559589</x>
+ <y>-970.885775371243</y>
+ </location>
+ </napplelabs.dbssim.neuron.NeuronPathRep>
+ <napplelabs.dbssim.neuron.NeuronPathRep>
+ <color reference="../../napplelabs.dbssim.neuron.NeuronPathRep[10]/color"/>
+ <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/7-PD-gpi.wav</mediaFile>
+ <location class="java.awt.geom.Point2D$Double">
+ <x>199.92344121678818</x>
+ <y>-809.0553068299577</y>
+ </location>
+ </napplelabs.dbssim.neuron.NeuronPathRep>
+ <napplelabs.dbssim.neuron.NeuronPathRep>
+ <color>
+ <red>255</red>
+ <green>0</green>
+ <blue>0</blue>
+ <alpha>255</alpha>
+ </color>
+ <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/10-PD-STN.wav</mediaFile>
+ <location class="java.awt.geom.Point2D$Double">
+ <x>33.7558047283421</x>
+ <y>-186.63475501900638</y>
+ </location>
+ </napplelabs.dbssim.neuron.NeuronPathRep>
+ <napplelabs.dbssim.neuron.NeuronPathRep>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>255</blue>
+ <alpha>255</alpha>
+ </color>
+ <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/7-PD-gpi.wav</mediaFile>
+ <location class="java.awt.geom.Point2D$Double">
+ <x>207.07171527285968</x>
+ <y>-711.3543876478071</y>
+ </location>
+ </napplelabs.dbssim.neuron.NeuronPathRep>
+ </list>
+</object-stream>
View
3 rundbssim.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+java -cp /Users/zkim/.m2/repository/com/explodingpixels/forms/1.2.1/forms-1.2.1.jar:/Users/zkim/.m2/repository/com/explodingpixels/macwidgets/1.0-SNAPSHOT/macwidgets-1.0-SNAPSHOT.jar:/Users/zkim/.m2/repository/com/google/code/guice/guice/1.0/guice-1.0.jar:/Users/zkim/.m2/repository/com/thoughtworks/qdox/qdox/1.6.3/qdox-1.6.3.jar:/Users/zkim/.m2/repository/com/thoughtworks/xstream/xstream/1.3.1/xstream-1.3.1.jar:/Users/zkim/.m2/repository/jline/jline/0.9.94/jline-0.9.94.jar:/Users/zkim/.m2/repository/junit/junit/4.5/junit-4.5.jar:/Users/zkim/.m2/repository/miglayout/miglayout/3.6.2/miglayout-3.6.2.jar:/Users/zkim/.m2/repository/minim/jl/1.0/jl-1.0.jar:/Users/zkim/.m2/repository/minim/jsminim/1.0/jsminim-1.0.jar:/Users/zkim/.m2/repository/minim/minim/1.0/minim-1.0.jar:/Users/zkim/.m2/repository/minim/minim-spi/1.0/minim-spi-1.0.jar:/Users/zkim/.m2/repository/minim/mp3spi/1.0/mp3spi-1.0.jar:/Users/zkim/.m2/repository/minim/tritonus_aos/1.0/tritonus_aos-1.0.jar:/Users/zkim/.m2/repository/minim/tritonus_share/1.0/tritonus_share-1.0.jar:/Users/zkim/.m2/repository/org/apache/ant/ant/1.7.1/ant-1.7.1.jar:/Users/zkim/.m2/repository/org/apache/ant/ant-launcher/1.7.1/ant-launcher-1.7.1.jar:/Users/zkim/.m2/repository/org/codehaus/groovy/groovy-all-minimal/1.5.6/groovy-all-minimal-1.5.6.jar:/Users/zkim/.m2/repository/org/codehaus/groovy/maven/gmaven-common/1.0-rc-3/gmaven-common-1.0-rc-3.jar:/Users/zkim/.m2/repository/org/codehaus/groovy/maven/feature/gmaven-feature-api/1.0-rc-3/gmaven-feature-api-1.0-rc-3.jar:/Users/zkim/.m2/repository/org/codehaus/groovy/maven/feature/gmaven-feature-support/1.0-rc-3/gmaven-feature-support-1.0-rc-3.jar:/Users/zkim/.m2/repository/org/codehaus/groovy/maven/runtime/gmaven-runtime-1.5/1.0-rc-3/gmaven-runtime-1.5-1.0-rc-3.jar:/Users/zkim/.m2/repository/org/codehaus/groovy/maven/runtime/gmaven-runtime-api/1.0-rc-3/gmaven-runtime-api-1.0-rc-3.jar:/Users/zkim/.m2/repository/org/codehaus/groovy/maven/runtime/gmaven-runtime-default/1.0-rc-3/gmaven-runtime-default-1.0-rc-3.jar:/Users/zkim/.m2/repository/org/codehaus/groovy/maven/runtime/gmaven-runtime-support/1.0-rc-3/gmaven-runtime-support-1.0-rc-3.jar:/Users/zkim/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.5/plexus-utils-1.5.5.jar:/Users/zkim/.m2/repository/org/slf4j/slf4j-api/1.5.0/slf4j-api-1.5.0.jar:/Users/zkim/.m2/repository/piccolo/piccolo/1.2.1/piccolo-1.2.1.jar:/Users/zkim/.m2/repository/piccolo/piccolox/1.2.1/piccolox-1.2.1.jar:/Users/zkim/.m2/repository/processing/core/1.0/core-1.0.jar:/Users/zkim/.m2/repository/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar:./target/dbssim-1.0-SNAPSHOT.jar napplelabs.dbssim.ui.SimUI
View
BIN src/main/.DS_Store
Binary file not shown.
View
12 src/main/groovy/napplelabs/dbssim/ui/BirdsEyeView.java
@@ -10,6 +10,7 @@
import edu.umd.cs.piccolo.PNode;
import edu.umd.cs.piccolo.event.PDragSequenceEventHandler;
import edu.umd.cs.piccolo.event.PInputEvent;
+import edu.umd.cs.piccolo.nodes.PPath;
import edu.umd.cs.piccolo.util.PDimension;
import edu.umd.cs.piccolo.util.PPaintContext;
import edu.umd.cs.piccolox.nodes.P3DRect;
@@ -52,14 +53,19 @@ public void propertyChange(PropertyChangeEvent evt) {
- setBounds(0, 0, 200, 200);
+ setBounds(10, 10, 200, 300);
// create the coverage node
- areaVisiblePNode = new P3DRect();
+ areaVisiblePNode = PPath.createRectangle(0, 0, 100, 100);
areaVisiblePNode.setPaint(new Color(128, 128, 255));
- areaVisiblePNode.setTransparency(.8f);
+ areaVisiblePNode.setTransparency(.4f);
areaVisiblePNode.setBounds(0, 0, 100, 100);
getCamera().addChild(areaVisiblePNode);
+
+ PPath areaVisibleBorder = PPath.createRectangle(0, 0, 200, 300);
+ areaVisibleBorder.setPaint(new Color(0, 0, 0, 0));
+ areaVisibleBorder.setStrokePaint(Color.lightGray);
+ getCamera().addChild(areaVisibleBorder);
// add the drag event handler
getCamera().addInputEventListener(new PDragSequenceEventHandler() {
View
31 src/main/groovy/napplelabs/dbssim/ui/CanvasPanel.java
@@ -1,10 +1,12 @@
package napplelabs.dbssim.ui;
import java.awt.BorderLayout;
+import java.awt.Color;
import java.awt.Component;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
@@ -13,11 +15,13 @@
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
+import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;
import javax.swing.JButton;
import javax.swing.JFrame;
+import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JSlider;
import javax.swing.event.ChangeEvent;
@@ -46,7 +50,10 @@
private Minim minim;
- public CanvasPanel(Minim minim) {
+ private JLabel label;
+
+ public CanvasPanel(Minim minim, JLabel label) {
+ this.label = label;
this.minim = minim;
setLayout(new BorderLayout());
add(canvas, BorderLayout.CENTER);
@@ -97,15 +104,15 @@ private Component createFeaturePanel() {
JButton thal = new JButton("Thalamus");
thal.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
- addNeuron(new ThalamusPath(minim));
+ addNeuron(new NeuronPath(Color.blue, "/Users/zkim/napplelabs/dbssim/src/main/resources/7-PD-gpi.wav", minim));
}
});
panel.add(thal);
JButton stn = new JButton("STN");
stn.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
- addNeuron(new StnPath(minim));
+ addNeuron(new NeuronPath(Color.red, "/Users/zkim/napplelabs/dbssim/src/main/resources/10-PD-STN.wav", minim));
}
});
panel.add(stn);
@@ -114,7 +121,7 @@ public void actionPerformed(ActionEvent e) {
snr.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
- addNeuron(new SnrPath(minim));
+ addNeuron(new NeuronPath(Color.green, "/Users/zkim/napplelabs/dbssim/src/main/resources/15-PD-SNr.wav", minim));
}
});
panel.add(snr);
@@ -144,6 +151,22 @@ public void stateChanged(ChangeEvent e) {
probe.setDepth((double) slider.getValue() / 1000);
canvas.repaint();
recalcDistances();
+ DecimalFormat twoPlaces = new DecimalFormat("0.00");
+ label.setText(twoPlaces.format(-probe.getDepth()) + " mm");
+ Rectangle2D rect = canvas.getCamera().getViewBounds();
+ double x = rect.getX();
+ double y = rect.getY();
+
+ double w = rect.getWidth();
+ double h = rect.getHeight();
+
+ double p_x = probe.getProbe().getGlobalTranslation().getX();
+ double p_y = probe.getProbe().getGlobalTranslation().getY();
+
+ Rectangle2D new_r = new Rectangle2D.Double(p_x - w/2, p_y - h/2, w, h);
+
+ //canvas.getCamera().animateViewToCenterBounds(new_r, true, 1);
+ canvas.getCamera().setViewBounds(new_r);
}
});
View
9 src/main/groovy/napplelabs/dbssim/ui/MacFrame.groovy
@@ -55,6 +55,10 @@ public class MacFrame{
frame.contentPane.add(content, BorderLayout.CENTER)
}
+
+ public void setVisisble(boolean vis) {
+ frame.visible = vis
+ }
public boolean getVisible() {
return frame.visible
@@ -78,6 +82,11 @@ public class MacFrame{
def addToolbarButton(List<JButton> buttons) {
+ ButtonGroup group = new ButtonGroup();
+
+ buttons.eachWithIndex {button, i ->
+ button.putClientProperty("JButton.buttonType", "segmentedTextured");
+ if(i == 0) {
button.putClientProperty("JButton.segmentPosition", "first");
} else if(i == buttons.size()-1) {
button.putClientProperty("JButton.segmentPosition", "last");
View
19 ...vy/napplelabs/dbssim/ui/NeuronPath.groovy → .../groovy/napplelabs/dbssim/ui/Probe.groovy
@@ -3,24 +3,7 @@ package napplelabs.dbssim.ui
import edu.umd.cs.piccolo.PNode
import java.awt.Color
import edu.umd.cs.piccolo.nodes.PPath
-import napplelabs.dbssim.neuron.NeuronPath
-import ddf.minim.Minim
-import java.awt.BasicStroke
-import java.awt.geom.Point2D
-import edu.umd.cs.piccolo.nodes.PText
-import java.awt.Font
-class ThalamusPath extends NeuronPath {
- public ThalamusPath(Minim minim) {
- super(Color.blue, "/Users/zkim/napplelabs/dbssim/src/main/resources/Rage Against The Machine - rage against the machine - 06 - Know Your Enemy.mp3", minim)
- }
-}
-
-class StnPath extends NeuronPath {
- public StnPath(Minim minim) {
- super(Color.red, "/Users/zkim/napplelabs/dbssim/src/main/resources/10-PD-STN.wav", minim)
- }
-}
-
+import napplelabs.dbssim.neuron.NeuronPath
import ddf.minim.Minim
import java.awt.BasicStroke
import java.awt.geom.Point2D
View
15 src/main/groovy/napplelabs/dbssim/ui/SimUI.groovy
@@ -25,7 +25,7 @@ import ddf.minim.AudioPlayer
import processing.core.PApplet
import napplelabs.dbssim.SignalContainer
import java.awt.Component
-
+import java.awt.Font
class SimUI {
MacFrame mf
Component currentComponent = new JPanel()
@@ -89,22 +89,29 @@ class SimUI {
} as Runnable)
} as ActionListener)
- mf.addToolbarComponentRight(playButton)
+
+
+ JLabel depthLabel = new JLabel("0.00 mm")
+ depthLabel.font = new Font("Arial", Font.PLAIN, 30)
+ //mf.addToolbarComponentLeft(depthLabel)
//Set up tabs
tracePanel = new TracePApplet(container)
- tracePanel.init()
+ //tracePanel.init()
- def canvasPanel = new CanvasPanel(minim)
+ def canvasPanel = new CanvasPanel(minim, depthLabel)
TabManager tabManager = new TabManager(mf.content)
tabManager.add("Canvas", canvasPanel)
tabManager.add("Trace", tracePanel)
+
+ mf.addBottombarComponentCenter(depthLabel)
mf.addToolbarComponentCenter(tabManager.build().component)
+ mf.addToolbarComponentRight(playButton)
mf.frame.visible = true
View
BIN target/classes/napplelabs/resources/dotmac.png
Deleted file not rendered
View
BIN target/classes/napplelabs/resources/sourceViewNormal.png
Deleted file not rendered
View
BIN target/classes/napplelabs/resources/sourceViewNormalSelected.png
Deleted file not rendered

0 comments on commit b0aebae

Please sign in to comment.