Package com.intellij.openapi.ui

Examples of com.intellij.openapi.ui.SelectFromListDialog


    public void actionPerformed(final ActionEvent pEvent) {
        final Project project = model.getXmlFile().getProject();
        final MavenReportManager mgr = MavenReportManager.getInstance(project);
        final Report[] reports = mgr.getReports();

        final SelectFromListDialog dlg = new SelectFromListDialog(
                project,
                reports,
                TO_STRING_ASPECT,
                TITLE,
                ListSelectionModel.SINGLE_SELECTION);

        dlg.addToDialog(new MultiLineLabel(RES.get("select.report.label")),
                        BorderLayout.PAGE_START);

        dlg.setModal(true);
        dlg.setResizable(true);
        dlg.setSelection(value);
        dlg.show();

        if (dlg.isOK()) {
            final Object[] selection = dlg.getSelection();

            if (selection != null && selection.length > 0)
                value = ((Report) selection[0]).getId();
            else
                return;
View Full Code Here


        }

        if (pTitle == null || pTitle.trim().length() == 0)
            pTitle = DEFAULT_TITLE;

        final SelectFromListDialog dlg = new SelectFromListDialog(
                pProject,
                pPomUrls,
                new SelectFromListDialog.ToStringAspect() {
                    public String getToStirng(Object obj) {
                        return PathUtil.toPresentableUrl(obj.toString());
                    }
                },
                pTitle,
                ListSelectionModel.SINGLE_SELECTION);

        if (pLabel != null && pLabel.trim().length() > 0)
            dlg.addToDialog(new MultiLineLabel(pLabel), BorderLayout.PAGE_START);

        dlg.setModal(true);
        dlg.setResizable(true);
        dlg.show();

        if (!dlg.isOK())
            return null;

        return dlg.getSelection()[0].toString();
    }
View Full Code Here

        if (pLabel == null || pLabel.trim().length() == 0)
            label = "Please select the local repository to use:";
        else
            label = pLabel;

        final SelectFromListDialog dlg = new SelectFromListDialog(
                project,
                repoUrls,
                SIMPLE_TO_STRING_ASPECT,
                title,
                ListSelectionModel.SINGLE_SELECTION);

        dlg.addToDialog(new MultiLineLabel(label), BorderLayout.PAGE_START);
        dlg.setModal(true);
        dlg.setResizable(true);
        dlg.show();

        if (!dlg.isOK())
            return null;

        return dlg.getSelection()[0].toString();
    }
View Full Code Here

                    DDLFileNameProvider fileNameProvider = new DDLFileNameProvider(object, ddlFileType, extension);
                    fileNameProviders.add(fileNameProvider);
                }
            }

            SelectFromListDialog fileTypeDialog = new SelectFromListDialog(
                    object.getProject(), fileNameProviders.toArray(),
                    ListUtil.BASIC_TO_STRING_ASPECT,
                    "Select DDL file type",
                    ListSelectionModel.SINGLE_SELECTION);
            JList list = (JList) fileTypeDialog.getPreferredFocusedComponent();
            list.setCellRenderer(new DDLFileNameListCellRenderer());
            fileTypeDialog.show();
            Object[] selectedFileTypes = fileTypeDialog.getSelection();
            if (selectedFileTypes != null) {
                return (DDLFileNameProvider) selectedFileTypes[0];
            }
        }
        return null;
View Full Code Here

TOP

Related Classes of com.intellij.openapi.ui.SelectFromListDialog

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.