Talrijke aanpassingen gemaakt. Vorige commit gaf een fout en ik heb geen zin om informatie opnieuw te typen.

This commit is contained in:
2011-02-20 12:36:53 +00:00
parent 757d4f3868
commit b77e280343
26 changed files with 704 additions and 60 deletions

View File

@@ -29,6 +29,9 @@ public class JIntellitypeDevice extends Device implements HotkeyListener, Intell
public void initialise() throws DeviceInitialiseException {
jit.addHotKeyListener(this);
jit.addIntellitypeListener(this);
add(
new Hotkey(HotkeyButton.CTRL | HotkeyButton.WIN, 'q'),
new Task(Action.PLAY, Target.APPLICATIONS));
add(
new Hotkey(HotkeyButton.CTRL | HotkeyButton.WIN, 'x'),
new Task(Action.EXIT, Target.MAIN));
@@ -38,7 +41,7 @@ public class JIntellitypeDevice extends Device implements HotkeyListener, Intell
add(
new Hotkey(HotkeyButton.CTRL | HotkeyButton.WIN, 'r'),
new Hotkey(HotkeyButton.CTRL | HotkeyButton.WIN, 's'),
new Continuous(Action.REPEAT, Target.APPLICATION, 500));
new Continuous(Action.REPEAT, Target.APPLICATIONS, 500));
}
public void onIntellitype(int command) {

View File

@@ -0,0 +1,22 @@
package pm.device.player;
import javazoom.jlgui.player.amp.StandalonePlayer;
import pm.Device;
import pm.exception.device.DeviceExitException;
public class PlayerDevice extends Device {
StandalonePlayer standalonePlayer;
public void initialise() {
standalonePlayer = new StandalonePlayer();
standalonePlayer.loadUI();
//standalonePlayer.loadJS();
//standalonePlayer.loadPlaylist();
//standalonePlayer.
System.out.println("niets!");
}
public void exit() throws DeviceExitException {
super.exit();
}
}

View File

@@ -9,12 +9,15 @@ import pm.Button;
import pm.Device;
import pm.Target;
import pm.Task;
import pm.device.javainput.rumblepad.RumblepadButton;
import pm.device.wiimote.gesture.GestureDevice;
import pm.exception.device.DeviceInitialiseException;
import pm.exception.event.UnknownButtonException;
import pm.macro.event.Hold;
import pm.macro.event.Press;
import pm.macro.event.Release;
import pm.task.Continuous;
import pm.task.Dynamic;
import wiiusej.Wiimote;
import wiiusej.values.Acceleration;
@@ -46,7 +49,7 @@ public class WiimoteDevice extends Device implements GestureListener {
public void initialise() throws DeviceInitialiseException {
wiimote = wiimoteService.getDevice(this);
wiimote.activateMotionSensing();
add(
/*add(
new Hold(WiimoteButton.A),
new Task(Action.TRAIN, Target.DEVICE),
new Task(Action.STOP, Target.DEVICE));
@@ -59,7 +62,37 @@ public class WiimoteDevice extends Device implements GestureListener {
add(
new Hold(WiimoteButton.HOME),
new Task(Action.RECOGNIZE, Target.DEVICE),
new Task(Action.STOP, Target.DEVICE));
new Task(Action.STOP, Target.DEVICE));*/
add(
new Press(WiimoteButton.A),
new Task(Action.PLAY, Target.APPLICATION));
add(
new Press(WiimoteButton.B),
new Task(Action.MUTE, Target.APPLICATION));
add(
new Press(WiimoteButton.ONE),
new Task(Action.SHUFFLE, Target.APPLICATION));
add(
new Press(WiimoteButton.TWO),
new Task(Action.NEXT, Target.MAIN));
add(
new Press(WiimoteButton.UP),
new Task(Action.NEXT, Target.APPLICATION));
add(
new Press(WiimoteButton.DOWN),
new Task(Action.PREVIOUS, Target.APPLICATION));
add(
new Hold(WiimoteButton.RIGHT),
new Dynamic(Action.FORWARD, Target.APPLICATION, 200, -30));
add(
new Hold(WiimoteButton.LEFT),
new Dynamic(Action.REWIND, Target.APPLICATION, 200, -30));
add(
new Hold(WiimoteButton.MINUS),
new Continuous(Action.VOLUME_DOWN, Target.APPLICATION, 100));
add(
new Hold(WiimoteButton.PLUS),
new Continuous(Action.VOLUME_UP, Target.APPLICATION, 100));
}
public void exit() {