Search in sources :

Example 1 with UnitCollectionGenerator

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);
}
Also used : JPanel(javax.swing.JPanel) UnitCollectionGenerator(tryout.stub.UnitCollectionGenerator) UnitCollection(eu.ggnet.dwoss.uniqueunit.ee.entity.UnitCollection) JButton(javax.swing.JButton)

Aggregations

UnitCollection (eu.ggnet.dwoss.uniqueunit.ee.entity.UnitCollection)1 JButton (javax.swing.JButton)1 JPanel (javax.swing.JPanel)1 UnitCollectionGenerator (tryout.stub.UnitCollectionGenerator)1