use of tryout.stub.UnitCollectionGenerator in project dwoss by gg-net.
the class UnitCollectionEditorTryout method main.
/**
* The main() method is ignored in correctly deployed JavaFX application.
* main() serves only as fallback in case the application can not be
* launched through deployment artifacts, e.g., in IDEs with limited FX
* support. NetBeans ignores main().
*
* @param args the command line arguments
* @throws java.lang.InterruptedException
*/
public static void main(String[] args) throws InterruptedException {
UnitCollectionGenerator ucg = new UnitCollectionGenerator();
UnitCollection uc = ucg.generateUnitCollections().get(0);
JButton close = new JButton("Schliessen");
close.addActionListener(e -> Ui.closeWindowOf(close));
JButton run = new JButton("OpenUi");
run.addActionListener(ev -> {
Ui.exec(() -> {
Ui.build().fxml().eval(() -> uc, UnitCollectionEditorController.class).opt().ifPresent(System.out::println);
});
});
JPanel p = new JPanel();
p.add(run);
p.add(close);
UiCore.startSwing(() -> p);
}
Aggregations