Package org.jitterbit.ui.dialog

Examples of org.jitterbit.ui.dialog.KongaDialog


     *         user cancelled the request.
     */
    public static LoadSourceDataInput getInput(DatabaseStructure dbStruct) {
        assert EventQueue.isDispatchThread() : "This method must be called on the EDT";
        DatabaseFilterDefiner d = new DatabaseFilterDefiner(dbStruct);
        KongaDialog dlg = createDialog(UiUtils.getActiveFrame(), d.getDefiner());
        dlg.setVisible(true);
        if (dlg.wasOkPressed()) {
            return d.getDefiner().getInput();
        }
        return null;
    }


    private static KongaDialog createDialog(JFrame owner, UiProvider ui) {
        JComponent wrapper = BorderLayoutBuilder.fillWith(ui);
        wrapper.setBorder(Empty.border(10));
        wrapper.setOpaque(true);
        UiUtils.setPanelBackgrounds(wrapper, Colors.NEUTRAL_BACKGROUND);
        KongaDialog dialog = new WizardStyleDialog(owner, Strings.get("SourceFilterDialog.Title"), wrapper);
        dialog.setResizable(false);
        dialog.manageLocation(DatabaseFilterDefiner.class);
        dialog.setOkButtonAsDefault();
        return dialog;
    }

            }
        });
    }
   
    private void showDialog() {
        KongaDialog dlg = new KongaDialog(UiUtils.getActiveWindow(), Strings.get("ViewHostedWebServiceUrl.Title"));
        createContentPane(dlg);
        dlg.enableUndoRedoForTextComponents(UndoRedoControllers.textFactory());
        dlg.pack();
        dlg.setResizable(false);
        dlg.manageLocation();
        dlg.setVisible(true);
    }

    public void setCallback(Receiver<Node> callback) {
        this.externalCallback = callback;
    }

    public void open() {
        KongaDialog dialog = createDialog();
        installCallback(dialog);
        dialog.setVisible(true);
        controller.stopSearch();
    }

        controller.stopSearch();
    }

    private KongaDialog createDialog() {
        Window owner = SwingUtilities.getWindowAncestor(model.getOpposingTree());
        KongaDialog dialog = new KongaDialog(owner, "Mapping Suggestions") {

            @Override
            protected void onDialogOpened() {
                controller.startSearch();
                ui.requestFocus();
            }
        };
        dialog.standardLayout(ui, KongaDialog.CLOSE_ONLY);
        dialog.manageLocation(getClass());
        return dialog;
    }

        parentChildSelector.repaint();
    }

    private boolean defineProperties(TableRelationship r) {
        final JoinPropertiesUi joinProperties = new JoinPropertiesUi(r);
        KongaDialog dialog = new WizardStyleDialog(UiUtils.getActiveWindow(), getString("Db.Relations.JoinProperties"),
                        joinProperties) {

            @Override
            protected void onOk() {
                if (joinProperties.checkInput()) {
                    super.onOk();
                }
            }
        };
        dialog.setFocusedComponent(joinProperties);
        dialog.manageLocation(JoinPropertiesUi.class);
        dialog.setOkButtonAsDefault();
        dialog.setVisible(true);
        if (dialog.wasOkPressed()) {
            joinProperties.apply();
            return true;
        }
        return false;
    }

        public void display() {
            Window owner = (trigger != null ? SwingUtilities.getWindowAncestor(trigger) : null);
            if (owner == null) {
                owner = UiUtils.getActiveWindow();
            }
            KongaDialog dialog = createDialog(owner, table);
            dialog.pack();
            dialog.manageLocation(InvalidMappingsViewer.class);
            dialog.setOkButtonAsDefault();
            dialog.setVisible(true);
            if (dialog.wasOkPressed()) {
                applyChanges();
            }
        }

                applyChanges();
            }
        }

        private KongaDialog createDialog(final Window owner, final InvalidMappingsTable table) {
            KongaDialog dlg = new KongaDialog(owner, TreeStrings.get("InvalidMappings.Dialog.Title")) {

                @Override
                protected void onDialogOpened() {
                    super.onDialogOpened();
                    table.requestFocus();

        if (searchUi == null) {
            searchUi = new TreeMapperSearchUi(this);
        } else {
            searchUi.reset();
        }
        searchDialog = new KongaDialog(getOwner(), "Search & Replace", ModalityType.MODELESS) {

            @Override
            protected void onDialogClose() {
                searchDialog = null;
                super.onDialogClose();

    public void showInDialog(final JFrame parent) {
        UiUtils.runOnEventThread(new Runnable() {

            @Override
            public void run() {
                KongaDialog dlg = UiProviderDialogDisplayer.createDialog(parent, ui, Strings.get("Connection.MatchingFiles.Title"),
                                KongaDialog.OK_ONLY, null);
                dlg.setMinimumSize(new Dimension(300, 300));
                dlg.setVisible(true);
            }
        });
    }

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.