Package org.openide

Examples of org.openide.DialogDescriptor


    }//GEN-LAST:event_jRemoveButtonActionPerformed

    private void jAddNewButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jAddNewButtonActionPerformed
        AddNewTaskPanel panel = new AddNewTaskPanel();

        DialogDescriptor dlgDescriptor = new DialogDescriptor(
                panel,
                NbStrings.getAddNewTaskDlgTitle(),
                true,
                new Object[]{DialogDescriptor.OK_OPTION, DialogDescriptor.CANCEL_OPTION},
                DialogDescriptor.OK_OPTION,
                DialogDescriptor.BOTTOM_ALIGN,
                null,
                null);
        Dialog dlg = DialogDisplayer.getDefault().createDialog(dlgDescriptor);
        dlg.pack();
        dlg.setVisible(true);
        if (dlgDescriptor.getValue() == DialogDescriptor.OK_OPTION) {
            String displayName = panel.getDisplayName();
            if (!displayName.isEmpty()) {
                PredefinedTask newTask = new PredefinedTask(
                        displayName,
                        Collections.singletonList(new PredefinedTask.Name("tasks", true)),
View Full Code Here


    private void displayManageTasksPanel(String profileName, ProjectProperties properties) {
        ManageTasksPanel panel = new ManageTasksPanel();
        panel.initSettings(properties);

        DialogDescriptor dlgDescriptor = new DialogDescriptor(
                panel,
                NbStrings.getManageTasksDlgTitle(profileName),
                true,
                new Object[]{DialogDescriptor.OK_OPTION, DialogDescriptor.CANCEL_OPTION},
                DialogDescriptor.OK_OPTION,
                DialogDescriptor.BOTTOM_ALIGN,
                null,
                null);
        Dialog dlg = DialogDisplayer.getDefault().createDialog(dlgDescriptor);
        dlg.pack();
        dlg.setVisible(true);

        if (DialogDescriptor.OK_OPTION == dlgDescriptor.getValue()) {
            panel.saveTasks(properties);
        }
    }
View Full Code Here

    }

    private void displayManageBuiltInTasksPanel(String profileName, ProjectProperties properties) {
        ManageBuiltInTasksPanel panel = new ManageBuiltInTasksPanel(project, properties);

        DialogDescriptor dlgDescriptor = new DialogDescriptor(
                panel,
                NbStrings.getManageBuiltInTasksDlgTitle(profileName),
                true,
                new Object[]{DialogDescriptor.OK_OPTION, DialogDescriptor.CANCEL_OPTION},
                DialogDescriptor.OK_OPTION,
                DialogDescriptor.BOTTOM_ALIGN,
                null,
                null);
        Dialog dlg = DialogDisplayer.getDefault().createDialog(dlgDescriptor);
        dlg.pack();
        dlg.setVisible(true);

        if (DialogDescriptor.OK_OPTION == dlgDescriptor.getValue()) {
            panel.saveModifiedTasks();
        }
    }
View Full Code Here

    private void jAddProfileButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jAddProfileButtonActionPerformed
        final AddNewProfilePanel panel = new AddNewProfilePanel();
        panel.startValidation();

        final DialogDescriptor dlgDescriptor = new DialogDescriptor(
                panel,
                NbStrings.getAddNewProfileCaption(),
                true,
                new Object[]{DialogDescriptor.OK_OPTION, DialogDescriptor.CANCEL_OPTION},
                DialogDescriptor.OK_OPTION,
                DialogDescriptor.BOTTOM_ALIGN,
                null,
                null);

        final org.jtrim.property.PropertySource<Boolean> validProfileName = panel.validProfileName();
        validProfileName.addChangeListener(new Runnable() {
            @Override
            public void run() {
                dlgDescriptor.setValid(validProfileName.getValue());
            }
        });
        dlgDescriptor.setValid(validProfileName.getValue());

        Dialog dlg = DialogDisplayer.getDefault().createDialog(dlgDescriptor);
        dlg.pack();
        dlg.setVisible(true);

        if (DialogDescriptor.OK_OPTION != dlgDescriptor.getValue()) {
            return;
        }

        String profileName = panel.getProfileName();
        if (profileName.isEmpty()) {
View Full Code Here

        }

        private String doSaveTask(CustomActionPanel actionPanel) {
            AddNewTaskPanel panel = new AddNewTaskPanel();

            DialogDescriptor dlgDescriptor = new DialogDescriptor(
                    panel,
                    NbStrings.getAddNewTaskDlgTitle(),
                    true,
                    new Object[]{DialogDescriptor.OK_OPTION, DialogDescriptor.CANCEL_OPTION},
                    DialogDescriptor.OK_OPTION,
                    DialogDescriptor.BOTTOM_ALIGN,
                    null,
                    null);
            Dialog dlg = DialogDisplayer.getDefault().createDialog(dlgDescriptor);
            dlg.pack();
            dlg.setVisible(true);
            if (dlgDescriptor.getValue() != DialogDescriptor.OK_OPTION) {
                return null;
            }
            String displayName = panel.getDisplayName();
            if (displayName.isEmpty()) {
                return null;
View Full Code Here

        public void actionPerformed(ActionEvent e) {
            CustomActionPanel panel = new CustomActionPanel();
            JButton executeButton = new JButton(NbStrings.getExecuteLabel());
            JButton saveAndExecuteButton = new JButton(NbStrings.getSaveAndExecuteLabel());

            DialogDescriptor dlgDescriptor = new DialogDescriptor(
                panel,
                NbStrings.getCustomTaskDlgTitle(),
                true,
                new Object[]{executeButton, saveAndExecuteButton, DialogDescriptor.CANCEL_OPTION},
                executeButton,
                DialogDescriptor.BOTTOM_ALIGN,
                null,
                null);
            Dialog dlg = DialogDisplayer.getDefault().createDialog(dlgDescriptor);
            dlg.setVisible(true);

            String displayName;
            boolean doExecute = false;
            boolean okToClose;
            do {
                displayName = null;
                okToClose = true;
                Object selectedButton = dlgDescriptor.getValue();

                if (saveAndExecuteButton == selectedButton) {
                    displayName = doSaveTask(panel);
                    okToClose = displayName != null;
View Full Code Here

            AsyncGradleTask task = getLastTask();
            if (task != null && lastSource != null) {
                CustomActionPanel panel = new CustomActionPanel(false);
                panel.updatePanel(toPredefined(lastSource));

                DialogDescriptor dlgDescriptor = new DialogDescriptor(
                        panel,
                        NbStrings.getCustomTaskDlgTitle(),
                        true,
                        new Object[]{DialogDescriptor.OK_OPTION, DialogDescriptor.CANCEL_OPTION},
                        DialogDescriptor.OK_OPTION,
                        DialogDescriptor.BOTTOM_ALIGN,
                        null,
                        null);
                Dialog dlg = DialogDisplayer.getDefault().createDialog(dlgDescriptor);
                dlg.pack();
                dlg.setVisible(true);
                if (dlgDescriptor.getValue() != DialogDescriptor.OK_OPTION) {
                    return;
                }

                GradleCommandTemplate template
                        = panel.tryGetGradleCommand(lastSource.getCommandName());
View Full Code Here

        return button;
    }

    public static void showModalDialog(String caption, String detailsContent) {
        IssueDetailsPanel panel = new IssueDetailsPanel(detailsContent);
        DialogDescriptor dlgDescriptor = new DialogDescriptor(
                panel,
                caption,
                true,
                new Object[]{DialogDescriptor.OK_OPTION},
                DialogDescriptor.OK_OPTION,
View Full Code Here

            @Override
            public void actionPerformed(ActionEvent e) {
                TextModelImpl model = VizController.getInstance().getVizModel().getTextModel();
                LabelAttributesPanel panel = new LabelAttributesPanel();
                panel.setup(model);
                DialogDescriptor dd = new DialogDescriptor(panel, NbBundle.getMessage(VizBarController.class, "LabelAttributesPanel.title"), true, NotifyDescriptor.OK_CANCEL_OPTION, null, null);
                if (DialogDisplayer.getDefault().notify(dd).equals(NotifyDescriptor.OK_OPTION)) {
                    panel.unsetup();
                    return;
                }
            }
View Full Code Here

            public void actionPerformed(ActionEvent e) {
                //Set
                ReportPanel.this.report.setUserDescription(problemArea.getText());
                ReportPanel.this.report.setUserEmail(emailTextField.getText());
                Document document = reportController.buildReportDocument(ReportPanel.this.report);
                DialogDescriptor dd = new DialogDescriptor(new ViewDataPanel(document), NbBundle.getMessage(ReportPanel.class, "ReportPanel.viewData.title"), true, DialogDescriptor.DEFAULT_OPTION, null, null);
                DialogDisplayer.getDefault().notify(dd);
            }
        });

        setup();
View Full Code Here

TOP

Related Classes of org.openide.DialogDescriptor

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.