Package org.jitterbit.ui.dialog

Examples of org.jitterbit.ui.dialog.KongaDialog


        }
        return goAhead[0];
    }

    private KongaDialog createDialog(Prompt prompt) {
        KongaDialog dlg = new KongaDialog(UiUtils.getActiveFrame(), "Stop current test?", true);
        dlg.setFixedButtonSize(false);
        BorderLayoutBuilder cp = new BorderLayoutBuilder(0, 10);
        cp.center(prompt).south(dlg.getButtonPanel(KongaDialog.OK_CANCEL, 10));
        dlg.getOKButton().setText(prompt.mode.continueLabel);
        dlg.getCancelButton().setText(prompt.mode.cancelLabel);
        cp.withEmptyBorder(10, 10, 10, 10).asContentPaneFor(dlg);
        dlg.setResizable(false);
        dlg.manageLocation(LogoutWhileDebuggingHandler.class);
        dlg.pack();
        dlg.setOkButtonAsDefault();
        return dlg;
    }


        resumeAction = new ResumeDebuggingAction(service);
        stopAction = new StopDebuggingAction(service);
    }

    public void open() {
        KongaDialog dialog = createDialog();
        dialog.setVisible(true);
        dispose();
    }

        p.north(north).center(selector);
        return p.container();
    }

    private KongaDialog createDialog(Window owner, String title, JComponent content) {
        KongaDialog dialog = new KongaDialog(owner, title) {

            @Override
            protected void onDialogOpened() {
                selector.requestFocus();
            }
        };
        dialog.standardLayout(content, KongaDialog.OK_CANCEL);
        return dialog;
    }

        if (!ConfirmDeletePreference.get()) {
            return true;
        }
        JFrame parent = UiUtils.getActiveFrame();
        Ui ui = new Ui(KList.convert(entities));
        KongaDialog dlg = UiProviderDialogDisplayer.createDialog(
                        parent,
                        ui,
                        PackageResources.DeleteConfirmer.TITLE,
                        KongaDialog.YES_NO,
                        null);
        dlg.getRootPane().setDefaultButton(dlg.getYesButton());
        dlg.setVisible(true);
        ui.updatePreferences();
        return dlg.wasOkPressed();
    }

        this.view = view;
        this.wizardTypes = wizardTypes;
    }

    public void open() {
        KongaDialog dialog = createDialog();
        dialog.setLocationRelativeTo(null);
        dialog.setVisible(true);
    }

        dialog.setVisible(true);
    }

    private KongaDialog createDialog() {
        ConnectLaunchScreen ui = new ConnectLaunchScreen(view, wizardTypes);
        final KongaDialog dialog = new KongaDialog(view.getWindow().getFrame(),
                        JitterbitConnectNames.JITTERBIT_CONNECT, true);
        BorderLayoutBuilder layout = layoutDialog(dialog, ui);
        layout.asContentPaneFor(dialog);
        dialog.setCancelOnEscape(true);
        ui.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                dialog.dispose();
            }
        });
        installFocusTraversalKeys(dialog);
        dialog.pack();
        dialog.setResizable(false);
        return dialog;
    }

    private KongaDialog createDialog(Window owner) {
        if (owner == null) {
            owner = UiUtils.getActiveWindow();
        }
        KongaDialog dialog = new KongaDialog(owner, title, ModalityType.MODELESS) {

            @Override
            protected void onDialogOpened() {
                focusUi();
            }

            @Override
            protected void onDialogClose() {
                super.onDialogClose();
                AbstractSearchDialog.this.dispose();
                notifyCloseListeners();
            }

            private void notifyCloseListeners() {
                for (Receiver<Void> lst : closeListeners) {
                    lst.handle(null);
                }
            }
        };
        layoutDialog(dialog);
        dialog.manageLocation(AbstractSearchDialog.class);
        return dialog;
    }

     * @return the selected <code>Date</code>. <code>null</code> is returned if the user cancels the
     *         dialog
     */
    public static Date selectFromDialog(Date initialDate, Window owner, String title) {
        DatePicker picker = new DatePicker(initialDate);
        KongaDialog dialog = UiProviderDialogDisplayer.createDialog(owner, picker, title,
                        ModalityType.APPLICATION_MODAL, KongaDialog.OK_CANCEL, null);
        dialog.setVisible(true);
        return dialog.wasOkPressed() ? picker.getSelectedDate() : null;
    }

TOP

Related Classes of org.jitterbit.ui.dialog.KongaDialog

Copyright © 2018 www.massapicom. 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.