this.player = player;
approveOption = false;
}
public void start() {
final Stage primaryStage = this;
GridPane grid = new GridPane();
grid.setAlignment(Pos.CENTER);
grid.setHgap(2);
grid.setVgap(10);
grid.setPadding(new Insets(10, 25, 10, 25));
ToggleGroup group = new ToggleGroup();
goToNumber = new RadioButton("Go To Number:");
goToNumber.setSelected(true);
goToNumber.setToggleGroup(group);
goToTime = new RadioButton("Go To Time:");
goToTime.setToggleGroup(group);
keyField = new TextField();
hField = new TextField("00");
mField = new TextField("00");
sField = new TextField("00");
msField = new TextField("000");
Label separator1 = new Label(":");
Label separator2 = new Label(":");
Label msSeparator = new Label(",");
Button cancelButton = new Button("Cancel");
cancelButton.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent t) {
primaryStage.close();
}
});
Button okButton = new Button("OK");
okButton.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent t) {
okButtonListener();
approveOption = true;
setCaptionKey();
primaryStage.close();
}
});
HBox hbBtn = new HBox(10);
hbBtn.setAlignment(Pos.BOTTOM_RIGHT);
hbBtn.getChildren().add(cancelButton);
hbBtn.getChildren().add(okButton);
grid.add(goToNumber, 1, 1, 7, 1);
grid.add(goToTime, 1, 3, 7, 1);
grid.add(keyField, 2, 2, 7, 1);
grid.add(hField, 2, 4);
grid.add(separator1, 3, 4);
grid.add(mField, 4, 4);
grid.add(separator2, 5, 4);
grid.add(sField, 6, 4);
grid.add(msSeparator, 7, 4);
grid.add(msField, 8, 4);
grid.add(hbBtn, 1, 6, 8, 1);
Scene scene = new Scene(grid, 300, 250);
scene.getStylesheets().add("org/livesub/styles/GlobalStyle.css");
primaryStage.setResizable(false);
primaryStage.setTitle("Go To");
primaryStage.setScene(scene);
primaryStage.show();
}