Search in sources :

Example 1 with WINDOW_MODAL

use of javafx.stage.Modality.WINDOW_MODAL in project dwoss by gg-net.

the class GenerateOnePriceAction method actionPerformed.

@Override
public void actionPerformed(ActionEvent e) {
    Ui.exec(() -> {
        Ui.build().title("Bitte SopoNr eingeben :").dialog().eval(() -> {
            TextInputDialog dialog = new TextInputDialog();
            dialog.setContentText("Bitte SopoNr eingeben :");
            return dialog;
        }).opt().filter(s -> !StringUtils.isBlank(s)).map(r -> ReplyUtil.wrap(() -> Dl.remote().lookup(Exporter.class).onePrice(r))).filter(Ui.failure()::handle).map(Reply::getPayload).ifPresent(p -> Ui.build().modality(WINDOW_MODAL).title("SopoNr").fx().show(() -> Css.toHtml5WithStyle(PriceEngineResultFormater.toSimpleHtml(p)), () -> new HtmlPane()));
    });
}
Also used : Css(eu.ggnet.dwoss.rules.Css) AccessableAction(eu.ggnet.saft.core.auth.AccessableAction) CREATE_ONE_PRICE(eu.ggnet.dwoss.rights.api.AtomicRight.CREATE_ONE_PRICE) Ui(eu.ggnet.saft.Ui) ActionEvent(java.awt.event.ActionEvent) StringUtils(org.apache.commons.lang3.StringUtils) Dl(eu.ggnet.saft.Dl) ReplyUtil(eu.ggnet.dwoss.common.ReplyUtil) TextInputDialog(javafx.scene.control.TextInputDialog) Reply(eu.ggnet.saft.api.Reply) WINDOW_MODAL(javafx.stage.Modality.WINDOW_MODAL) HtmlPane(eu.ggnet.dwoss.util.HtmlPane) PriceEngineResultFormater(eu.ggnet.dwoss.price.engine.support.PriceEngineResultFormater) HtmlPane(eu.ggnet.dwoss.util.HtmlPane) TextInputDialog(javafx.scene.control.TextInputDialog)

Aggregations

ReplyUtil (eu.ggnet.dwoss.common.ReplyUtil)1 PriceEngineResultFormater (eu.ggnet.dwoss.price.engine.support.PriceEngineResultFormater)1 CREATE_ONE_PRICE (eu.ggnet.dwoss.rights.api.AtomicRight.CREATE_ONE_PRICE)1 Css (eu.ggnet.dwoss.rules.Css)1 HtmlPane (eu.ggnet.dwoss.util.HtmlPane)1 Dl (eu.ggnet.saft.Dl)1 Ui (eu.ggnet.saft.Ui)1 Reply (eu.ggnet.saft.api.Reply)1 AccessableAction (eu.ggnet.saft.core.auth.AccessableAction)1 ActionEvent (java.awt.event.ActionEvent)1 TextInputDialog (javafx.scene.control.TextInputDialog)1 WINDOW_MODAL (javafx.stage.Modality.WINDOW_MODAL)1 StringUtils (org.apache.commons.lang3.StringUtils)1