Search in sources :

Example 1 with JogTrainerWidget

use of com.neuronrobotics.sdk.addons.gamepad.JogTrainerWidget in project BowlerStudio by CommonWealthRobotics.

the class CalibrateGameControl method initializeUI.

@Override
public void initializeUI(BowlerAbstractDevice pm) {
    BowlerJInputDevice dev = (BowlerJInputDevice) pm;
    File fxmlFIle;
    try {
        fxmlFIle = AssetFactory.loadFile("layout/jogTrainerWidget.fxml");
        URL fileURL = fxmlFIle.toURI().toURL();
        FXMLLoader loader = new FXMLLoader(fileURL);
        loader.setLocation(fileURL);
        Parent root;
        w = new JogTrainerWidget(dev);
        loader.setController(w);
        // This is needed when loading on MAC
        loader.setClassLoader(JogTrainerWidget.class.getClassLoader());
        root = loader.load();
        setContent(root);
    } catch (Exception e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    setText("Calibrate Game Control");
    onTabReOpening();
}
Also used : Parent(javafx.scene.Parent) JogTrainerWidget(com.neuronrobotics.sdk.addons.gamepad.JogTrainerWidget) BowlerJInputDevice(com.neuronrobotics.sdk.addons.gamepad.BowlerJInputDevice) File(java.io.File) FXMLLoader(javafx.fxml.FXMLLoader) URL(java.net.URL)

Example 2 with JogTrainerWidget

use of com.neuronrobotics.sdk.addons.gamepad.JogTrainerWidget in project BowlerStudio by CommonWealthRobotics.

the class JogWidget method runControllerMap.

private void runControllerMap() {
    Stage s = new Stage();
    new Thread() {

        public void run() {
            JogTrainerWidget controller = new JogTrainerWidget(gameController);
            try {
                controller.start(s);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }.start();
}
Also used : Stage(javafx.stage.Stage) JogTrainerWidget(com.neuronrobotics.sdk.addons.gamepad.JogTrainerWidget)

Aggregations

JogTrainerWidget (com.neuronrobotics.sdk.addons.gamepad.JogTrainerWidget)2 BowlerJInputDevice (com.neuronrobotics.sdk.addons.gamepad.BowlerJInputDevice)1 File (java.io.File)1 URL (java.net.URL)1 FXMLLoader (javafx.fxml.FXMLLoader)1 Parent (javafx.scene.Parent)1 Stage (javafx.stage.Stage)1