Esempio n. 1
0
  public LSelectUI(PApplet app, Configuration config) {
    M4P.messagesEnabled(false);
    this.app = app;
    LSelectUI.config = config;
    this.controlIO = ControlIO.getInstance(app);
    List<ControlDevice> devices = controlIO.getDevices();

    String title = "Select device for " + LSelectUI.config.getUsgae();
    window = new MWindow(app, title, 80, 40, 500, 20 * (devices.size() + 3), false, PApplet.JAVA2D);
    window.setResizable(false);
    window.addDrawHandler(this, "draw");

    // Add entries for devices added
    for (ControlDevice d : devices) {
      if (d.available && !d.getTypeName().equalsIgnoreCase("keyboard"))
        deviceEntries.add(new LSelectEntry(this, controlIO, d));
    }

    createSelectionInterface(window.papplet);
    for (int i = 0; i < deviceEntries.size(); i++) deviceEntries.get(i).setIndex(i);
  }
Esempio n. 2
0
 public void exitClick(MButton source, MEvent event) {
   ControlIO.configurating = false;
   ControlIO.configuredDevice = null;
   window.forceClose();
 }
Esempio n. 3
0
 public void finishedWith() {
   window.forceClose();
 }