Package org.openide

Examples of org.openide.DialogDescriptor


            SwingUtilities.invokeLater(new Runnable() {
                @Override
                public void run() {
                    // create dialog
                    YiiRunActionPanel panel = new YiiRunActionPanel(params);
                    DialogDescriptor descriptor = new DialogDescriptor(panel, Bundle.LBL_YiiRunActionAction(), true, null);
                    Dialog dialog = DialogDisplayer.getDefault().createDialog(descriptor);

                    dialog.pack();
                    dialog.validate();
                    dialog.setVisible(true);
                    // open browser
                    if (descriptor.getValue() == DialogDescriptor.OK_OPTION) {
                        Map<String, String> requests = panel.getGetRequest();
                        openBrowser(pm, controllerId, actionId, requests);
                    }
                }
            });
View Full Code Here


        settingsButton.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                AvailableStatisticsChooser chooser = new AvailableStatisticsChooser();
                chooser.setup(model, ((StatisticsPanel) statisticsPanel).getCategories());
                DialogDescriptor dd = new DialogDescriptor(chooser, NbBundle.getMessage(StatisticsTopComponent.class, "AvailableStatisticsChooser.title"));
                if (DialogDisplayer.getDefault().notify(dd).equals(NotifyDescriptor.OK_OPTION)) {
                    chooser.unsetup();
                }
            }
        });
View Full Code Here

                DynamicSettingsPanel dynamicPanel = new DynamicSettingsPanel();
                statisticsUI.setup(currentStatistics);
                dynamicPanel.setup((DynamicStatistics) currentStatistics);
               
                JPanel dynamicSettingsPanel = DynamicSettingsPanel.createCounpoundPanel(dynamicPanel, settingsPanel);
                final DialogDescriptor dd = new DialogDescriptor(dynamicSettingsPanel, NbBundle.getMessage(StatisticsTopComponent.class, "StatisticsFrontEnd.settingsPanel.title", builder.getName()));
                if (dynamicSettingsPanel instanceof ValidationPanel) {
                    ValidationPanel vp = (ValidationPanel) dynamicSettingsPanel;
                    vp.addChangeListener(new ChangeListener() {

                        public void stateChanged(ChangeEvent e) {
                            dd.setValid(!((ValidationPanel) e.getSource()).isProblem());
                        }
                    });
                }

                if (DialogDisplayer.getDefault().notify(dd).equals(NotifyDescriptor.OK_OPTION)) {
                    dynamicPanel.unsetup((DynamicStatistics) currentStatistics);
                    statisticsUI.unsetup();
                    controllerUI.execute(currentStatistics, listener);
                }
            } else {
                if (settingsPanel != null) {
                    statisticsUI.setup(currentStatistics);

                    final DialogDescriptor dd = new DialogDescriptor(settingsPanel, NbBundle.getMessage(StatisticsTopComponent.class, "StatisticsFrontEnd.settingsPanel.title", builder.getName()));
                    if (settingsPanel instanceof ValidationPanel) {
                        ValidationPanel vp = (ValidationPanel) settingsPanel;
                        vp.addChangeListener(new ChangeListener() {

                            public void stateChanged(ChangeEvent e) {
                                dd.setValid(!((ValidationPanel) e.getSource()).isProblem());
                            }
                        });
                    }
                    if (DialogDisplayer.getDefault().notify(dd).equals(NotifyDescriptor.OK_OPTION)) {
                        statisticsUI.unsetup();
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

   * @return True, if OK was clicked, false otherwise.
   */
  private boolean processDialog() {
    panel = new CreateComponentGeneratorPanel();

    DialogDescriptor dd = new DialogDescriptor(panel, "Create component...", true, DialogDescriptor.OK_CANCEL_OPTION, DialogDescriptor.OK_OPTION, null);

    panel.setDialogDescriptor(dd);

    Object result = DialogDisplayer.getDefault().notify(dd);

View Full Code Here

    panel = new ActionRenderVisualPanel(new ActionRenderCodeGeneratorTableModel(methodChecker));

    panel.setMethodChecker(methodChecker);
    panel.setPresentersDirectory(getPresenterDir());

    DialogDescriptor dd = new DialogDescriptor(panel, NbBundle.getMessage(ActionRenderCodeGenerator.class, name), true, DialogDescriptor.OK_CANCEL_OPTION, DialogDescriptor.OK_OPTION, null);

    Object result = DialogDisplayer.getDefault().notify(dd);

    if (result != NotifyDescriptor.OK_OPTION) {
      return false;
View Full Code Here

        } else if (PROPERTIES_COMMAND.equals( string )) {
        } else if (CLOSE_COMMAND.equals( string )) {
            OpenProjects.getDefault().close( new Project[]{this} );
        } else if (LIBRARIES_COMMAND.equals( string )) {
            LibrariesPanel pn = new LibrariesPanel( this );
            DialogDescriptor dd = new DialogDescriptor( pn, NbBundle.getMessage( NodeJSProject.class, "SEARCH_FOR_LIBRARIES" ) ); //NOI18N
            DialogDisplayer.getDefault().notify( dd );
        } else if (COMMAND_DELETE.equals( string )) {
            DefaultProjectOperations.performDefaultDeleteOperation( this );
        } else if (COMMAND_MOVE.equals( string )) {
            DefaultProjectOperations.performDefaultMoveOperation( this );
View Full Code Here

    }

    @Override
    public void actionPerformed ( ActionEvent e ) {
        LibrariesPanel pn = new LibrariesPanel( project );
        DialogDescriptor dd = new DialogDescriptor( pn, NbBundle.getMessage( NodeJSProject.class, "SEARCH_FOR_LIBRARIES" ) ); //NOI18N
        if (DialogDisplayer.getDefault().notify( dd ).equals( DialogDescriptor.OK_OPTION )) {
            final Set<String> libraries = new HashSet<>( pn.getLibraries() );
            if (libraries.size() > 0) {
                final String npmPath = Npm.getDefault().exe( );
                final AtomicInteger jobs = new AtomicInteger();
View Full Code Here

    boolean notEmpty ( JTextComponent c ) {
        return c.getText().trim().length() > 0;
    }

    public void showDialog () {
        DialogDescriptor d = new DialogDescriptor( this, props.project().getLookup().lookup( ProjectInformation.class ).getDisplayName() );
        DialogDescriptorAdapter adap = new DialogDescriptorAdapter( d );
        g.addUI( adap );
        if (DialogDisplayer.getDefault().notify( d ).equals( DialogDescriptor.OK_OPTION )) {
            save();
        }
View Full Code Here

        if (!FuelUtils.isFuelPHP(phpModule)) {
            return;
        }
        // open dialog
        FuelPhpGeneratePanel generatePanel = getPanel(phpModule);
        DialogDescriptor descriptor = new DialogDescriptor(generatePanel, getPureName(), true, null);
        Dialog dialog = DialogDisplayer.getDefault().createDialog(descriptor);

        dialog.pack();
        dialog.validate();
        dialog.setVisible(true);
        if (descriptor.getValue() == DialogDescriptor.OK_OPTION) {
            try {
                // run command
                List<String> params = generatePanel.getParameters();
                Oil.forPhpModule(phpModule, true).runCommand(phpModule, params, new RefreshPhpModuleRunnable(phpModule));
            } catch (InvalidPhpExecutableException ex) {
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.