aboutsummaryrefslogtreecommitdiff
path: root/PunchingBag/src/uk/ac/open/punchingbag/PunchingBagGUI.java
diff options
context:
space:
mode:
authorChristopher Baines <cbaines8@gmail.com>2011-09-16 11:32:32 +0100
committerChristopher Baines <cbaines8@gmail.com>2011-09-16 11:32:32 +0100
commite4a1768e5928f899380483404995c0e5e555376e (patch)
tree59d77e562e68f1f51e4db0b027f11d3bc2f5de01 /PunchingBag/src/uk/ac/open/punchingbag/PunchingBagGUI.java
parentebc965a9f1dc2a1a6aaf66a0c048695eda3a7a25 (diff)
downloadpunchingbag-e4a1768e5928f899380483404995c0e5e555376e.tar
punchingbag-e4a1768e5928f899380483404995c0e5e555376e.tar.gz
Chnages for touch screen.
Diffstat (limited to 'PunchingBag/src/uk/ac/open/punchingbag/PunchingBagGUI.java')
-rw-r--r--PunchingBag/src/uk/ac/open/punchingbag/PunchingBagGUI.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/PunchingBag/src/uk/ac/open/punchingbag/PunchingBagGUI.java b/PunchingBag/src/uk/ac/open/punchingbag/PunchingBagGUI.java
index d71a6c6..4acb2d0 100644
--- a/PunchingBag/src/uk/ac/open/punchingbag/PunchingBagGUI.java
+++ b/PunchingBag/src/uk/ac/open/punchingbag/PunchingBagGUI.java
@@ -53,6 +53,8 @@ import javax.sound.sampled.UnsupportedAudioFileException;
import javax.sound.sampled.AudioFormat.Encoding;
import javax.sound.sampled.Mixer.Info;
+import uk.ac.open.punchingbag.examples.SimpleKeyboard;
+
import PicHelper.ImagePanel;
public class PunchingBagGUI implements MouseListener, MouseMotionListener,
@@ -82,7 +84,7 @@ public class PunchingBagGUI implements MouseListener, MouseMotionListener,
new File(soundDir + "E5.wav"), new File(soundDir + "F5.wav"),
new File(soundDir + "G5.wav") };
- String imageDirectory = System.getProperty("user.home");
+ String imageDirectory = System.getProperty("user.home") + System.getProperty("file.separator") + "My Documents" + System.getProperty("file.separator") + "images";
static PunchingBag bag = PunchingBag.getBag();
@@ -92,6 +94,7 @@ public class PunchingBagGUI implements MouseListener, MouseMotionListener,
public static void main(String[] args) throws InterruptedException {
new PunchingBagGUI();
+ new SimpleKeyboard();
}
PunchingBagGUI() throws InterruptedException {
@@ -225,7 +228,7 @@ public class PunchingBagGUI implements MouseListener, MouseMotionListener,
if (debugImages)
System.out.println("Moving to the next image ");
try {
- Thread.sleep(1000);
+ Thread.sleep(5000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
@@ -717,7 +720,7 @@ public class PunchingBagGUI implements MouseListener, MouseMotionListener,
System.out.println("Button Pressed: " + x + " " + y);
// bag.circleExpand(x, y, 16);
// bag.setLED(x, y, Color.red);
- bag.noise(new Rectangle(0, 0, 9, 20), 5000);
+ //bag.noise(new Rectangle(0, 0, 9, 20), 5000);
/*
* for (int bx=0; bx<bag.ledWidth; bx++) { for (int by=0;
* by<bag.ledHeight; by++) { bag.setLED(bx, by, PunchingBag.Colour.Red);