Search in sources :

Example 1 with UniqueUnitAgentStub

use of tryout.stub.UniqueUnitAgentStub in project dwoss by gg-net.

the class ProductListTryout 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
 */
public static void main(String[] args) {
    Dl.remote().add(UniqueUnitAgent.class, new UniqueUnitAgentStub());
    Dl.local().add(Guardian.class, new AbstractGuardian() {

        {
            setRights(new Operator("hans", 123, Arrays.asList(AtomicRight.values())));
        }

        @Override
        public void login(String user, char[] pass) throws AuthenticationException {
        }
    });
    JButton close = new JButton("Schliessen");
    close.addActionListener(e -> Ui.closeWindowOf(close));
    JButton run = new JButton("OpenUi");
    run.addActionListener(ev -> {
        Ui.exec(() -> {
            Ui.build().fxml().show(ProductListController.class);
        });
    });
    JPanel p = new JPanel();
    p.add(run);
    p.add(close);
    UiCore.startSwing(() -> p);
}
Also used : Operator(eu.ggnet.dwoss.rights.api.Operator) JPanel(javax.swing.JPanel) AuthenticationException(eu.ggnet.saft.core.auth.AuthenticationException) JButton(javax.swing.JButton) AbstractGuardian(eu.ggnet.dwoss.common.AbstractGuardian) UniqueUnitAgentStub(tryout.stub.UniqueUnitAgentStub)

Example 2 with UniqueUnitAgentStub

use of tryout.stub.UniqueUnitAgentStub in project dwoss by gg-net.

the class CategoryProductListEditTryout 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 {
    Dl.remote().add(UniqueUnitAgent.class, new UniqueUnitAgentStub());
    Dl.local().add(Guardian.class, new GuardianStub());
    JButton close = new JButton("Schliessen");
    close.addActionListener(e -> Ui.closeWindowOf(close));
    JButton run = new JButton("OpenUi");
    run.addActionListener(ev -> {
        Ui.exec(() -> {
            Ui.build().fxml().show(CategoryProductListController.class);
        });
    });
    JTextField textField = new JTextField();
    textField.setPreferredSize(new Dimension(200, 30));
    textField.setDragEnabled(true);
    JPanel p = new JPanel();
    p.add(run);
    p.add(textField);
    p.add(close);
    UiCore.startSwing(() -> p);
}
Also used : GuardianStub(tryout.stub.GuardianStub) Dimension(java.awt.Dimension) UniqueUnitAgentStub(tryout.stub.UniqueUnitAgentStub)

Example 3 with UniqueUnitAgentStub

use of tryout.stub.UniqueUnitAgentStub in project dwoss by gg-net.

the class TreeTableViewTryout 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
 */
public static void main(String[] args) {
    Dl.remote().add(UniqueUnitAgent.class, new UniqueUnitAgentStub());
    JButton close = new JButton("Schliessen");
    close.addActionListener(e -> Ui.closeWindowOf(close));
    JButton run = new JButton("OpenUi");
    run.addActionListener(ev -> {
        Ui.exec(() -> {
            Ui.build().fxml().show(TreeTableController.class);
        });
    });
    JPanel p = new JPanel();
    p.add(run);
    p.add(close);
    UiCore.startSwing(() -> p);
}
Also used : JPanel(javax.swing.JPanel) JButton(javax.swing.JButton) UniqueUnitAgentStub(tryout.stub.UniqueUnitAgentStub)

Aggregations

UniqueUnitAgentStub (tryout.stub.UniqueUnitAgentStub)3 JButton (javax.swing.JButton)2 JPanel (javax.swing.JPanel)2 AbstractGuardian (eu.ggnet.dwoss.common.AbstractGuardian)1 Operator (eu.ggnet.dwoss.rights.api.Operator)1 AuthenticationException (eu.ggnet.saft.core.auth.AuthenticationException)1 Dimension (java.awt.Dimension)1 GuardianStub (tryout.stub.GuardianStub)1