use of eu.ggnet.dwoss.rights.api.Operator 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);
}
Aggregations