Examples of ConfirmDialog


Examples of com.edgytech.swingfast.ConfirmDialog

    @Override
    public void windowClosing(WindowEvent e) {
        if (getJobBar().hasChildren()) {
            String text = "There are jobs running, force exit?";
            ConfirmDialog confirm = new ConfirmDialog(null, "Confirm Exit", null, text);
            if (!confirm.show()) {
                return;
            }
        }
        super.windowClosing(e);
    }
View Full Code Here

Examples of com.edgytech.swingfast.ConfirmDialog

        if (force)
            cmd.put("force", force);
        int timeout = getIntFieldValue(Item.shutdownTimeout);
        if (timeout > 0)
            cmd.put("timeoutSecs", timeout);
        ConfirmDialog dia = (ConfirmDialog) getBoundUnit(Item.shutdownConfirm);
        if (!dia.show())
            return;
        new DbJobCmd(getServerNode().getServerMongoClient().getDB("admin"), cmd).addJob();
    }
View Full Code Here

Examples of lcmc.common.ui.ConfirmDialog

    /**
     * Shows confirm dialog with yes and no options and returns true if yes
     * button was pressed.
     */
    public boolean confirmDialog(final String title, final String desc, final String yesButton, final String noButton) {
        final ConfirmDialog confirmDialog = confirmDialogProvider.get();
        confirmDialog.init(title, desc, yesButton, noButton);
        confirmDialog.showDialog();
        return confirmDialog.isPressedYesButton();
    }
View Full Code Here

Examples of megamek.client.ui.AWT.ConfirmDialog

            String body = Messages.getString("BotGUI.notifyOfBot.message"); //$NON-NLS-1$
            Dimension screenSize = frame.getToolkit().getScreenSize();
            frame.pack();
            frame.setLocation(screenSize.width / 2 - frame.getSize().width / 2,
                    screenSize.height / 2 - frame.getSize().height / 2);
            ConfirmDialog confirm = new ConfirmDialog(frame, title, body, true);
            confirm.setVisible(true);

            if (!confirm.getShowAgain()) {
                GUIPreferences.getInstance().setNagForBotReadme(false);
            }

            if (confirm.getAnswer()) {
                File helpfile = new File("docs/ai-readme.txt"); //$NON-NLS-1$
                new CommonHelpDialog(frame, helpfile).setVisible(true);
            }
        }
    }
View Full Code Here

Examples of megamek.client.ui.swing.ConfirmDialog

            String body = Messages.getString("BotGUI.notifyOfBot.message"); //$NON-NLS-1$
            Dimension screenSize = frame.getToolkit().getScreenSize();
            frame.pack();
            frame.setLocation(screenSize.width / 2 - frame.getSize().width / 2,
                    screenSize.height / 2 - frame.getSize().height / 2);
            ConfirmDialog confirm = new ConfirmDialog(frame, title, body, true);
            confirm.setVisible(true);

            if (!confirm.getShowAgain()) {
                GUIPreferences.getInstance().setNagForBotReadme(false);
            }

            if (confirm.getAnswer()) {
                File helpfile = new File("docs/ai-readme.txt"); //$NON-NLS-1$
                new CommonHelpDialog(frame, helpfile).setVisible(true);
            }
        }
    }
View Full Code Here

Examples of org.jbpm.formapi.common.panels.ConfirmDialog

   
    private Button createDeleteButton(final Element rowElem, final String url) {
        return new Button(i18n.RemoveButton(), new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                ConfirmDialog dialog = new ConfirmDialog(i18n.WarningDeleteFile());
                dialog.addOkButtonHandler(new ClickHandler() {
                    @Override
                    public void onClick(ClickEvent event) {
                        try {
                            server.deleteFile(toFileName(url));
                            RowFormatter formatter = table.getRowFormatter();
                            int rowNumber = 0;
                            for (; rowNumber < table.getRowCount(); rowNumber++) {
                                if (formatter.getElement(rowNumber).equals(rowElem)) {
                                    break;
                                }
                            }
                            table.removeRow(rowNumber);
                        } catch (FormBuilderException e) {
                            bus.fireEvent(new NotificationEvent(Level.ERROR, i18n.Error(e.getMessage()), e));
                        }
                    }
                });
                dialog.show();
            }
        });
    }
View Full Code Here

Examples of org.jbpm.formapi.common.panels.ConfirmDialog

        return super.isValidForItem(item) && item instanceof TableLayoutFormItem;
    }

    @Override
    public PopupPanel createPanel() {
        ConfirmDialog dialog = new ConfirmDialog(i18n.RemoveRowWarning());
        dialog.addOkButtonHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                createStyles();
            }
        });
View Full Code Here

Examples of org.jbpm.formapi.common.panels.ConfirmDialog

        return super.isValidForItem(item) && item instanceof TableLayoutFormItem;
    }

    @Override
    public PopupPanel createPanel() {
        ConfirmDialog dialog = new ConfirmDialog(i18n.RemoveColumnWarning());
        dialog.addOkButtonHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                createStyles();
            }
        });
View Full Code Here

Examples of org.jbpm.formapi.common.panels.ConfirmDialog

        return super.isValidForItem(item) && item instanceof TabbedLayoutFormItem;
    }
   
    @Override
    public PopupPanel createPanel() {
        ConfirmDialog dialog = new ConfirmDialog(i18n.RemoveTabWarning());
        dialog.addOkButtonHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                createStyles();
            }
        });
View Full Code Here

Examples of org.jbpm.formapi.common.panels.ConfirmDialog

        item.setSubMenu(subMenu);
        item.setCommand(null);
    }

    protected void reloadLocale(final String localeName, final MenuItem target) {
        final ConfirmDialog dialog = new ConfirmDialog(i18n.WarningLocaleReload());
        dialog.addOkButtonHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                String href = Window.Location.getHref();
                if (href.contains("&locale=")) {
                    href = removeParameterFromHref("locale", href);
                } else if (href.contains("?locale=")) {
                    href = removeParameterFromHref("locale", href);
                }
                if (href.contains("?")) {
                    href += "&locale=" + localeName;
                } else {
                    href += "?locale=" + localeName;
                }
                Window.Location.replace(href);
                dialog.hide();
            }
        });
        dialog.showRelativeTo(target);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.