Rumblepad geimplementeerd, actions toegevoegd en begin gemaakt met iTunes implementatie. Die geeft rare Jacob foutmeldingen over de versie.
This commit is contained in:
31
java/src/pm/device/textinput/TextinputDevice.java
Normal file
31
java/src/pm/device/textinput/TextinputDevice.java
Normal file
@@ -0,0 +1,31 @@
|
||||
package pm.device.textinput;
|
||||
|
||||
import java.util.Scanner;
|
||||
|
||||
import pm.device.Device;
|
||||
|
||||
public class TextinputDevice extends Device {
|
||||
static final int SLEEP = 50;
|
||||
|
||||
Scanner textinputScanner;
|
||||
boolean run;
|
||||
|
||||
public TextinputDevice() {
|
||||
textinputScanner = new Scanner(System.in);
|
||||
run = true;
|
||||
}
|
||||
|
||||
public void start() {
|
||||
while(run) {
|
||||
String textinput = textinputScanner.next();
|
||||
if(textinput != null) {
|
||||
System.out.println(textinput);
|
||||
}
|
||||
try {
|
||||
Thread.sleep(SLEEP);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user