Package org.openide

Examples of org.openide.WizardDescriptor


        wizardDescriptor = (WizardDescriptor) settings;
        component.read(wizardDescriptor);
    }

    public void storeSettings(Object settings) {
        WizardDescriptor d = (WizardDescriptor) settings;
        component.store(d);
    }
View Full Code Here


        wizardDescriptor = (WizardDescriptor) settings;
        component.read(wizardDescriptor);
    }

    public void storeSettings(Object settings) {
        WizardDescriptor d = (WizardDescriptor) settings;
        component.store(d);
    }
View Full Code Here

        wizardDescriptor = (WizardDescriptor) settings;
        component.read(wizardDescriptor);
    }

    public void storeSettings(Object settings) {
        WizardDescriptor d = (WizardDescriptor) settings;
        component.store(d);
    }
View Full Code Here

                return;
            }
        }

        iterator = new AddImageWizardIterator(this);
        wizardDescriptor = new WizardDescriptor(iterator);
        wizardDescriptor.setTitle(NbBundle.getMessage(this.getClass(), "AddImageAction.wizard.title"));
        wizardDescriptor.putProperty(NAME, e);

        if (dialog != null) {
            dialog.setVisible(false); // hide the old one
View Full Code Here

    /**
     * The method to perform new case creation
     */
    private void newCaseAction() {
        WizardDescriptor wizardDescriptor = new WizardDescriptor(getPanels());
        // {0} will be replaced by WizardDesriptor.Panel.getComponent().getName()
        wizardDescriptor.setTitleFormat(new MessageFormat("{0}"));
        wizardDescriptor.setTitle(NbBundle.getMessage(this.getClass(), "NewCaseWizardAction.newCase.windowTitle.text"));
        Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor);
        dialog.setVisible(true);
        dialog.toFront();


        boolean finished = wizardDescriptor.getValue() == WizardDescriptor.FINISH_OPTION; // check if it finishes (it's not cancelled)
        boolean isCancelled = wizardDescriptor.getValue() == WizardDescriptor.CANCEL_OPTION; // check if the "Cancel" button is pressed

        // if the finish button is pressed (not cancelled)
        if (finished) {
            // now start the 'Add Image' wizard
            //TODO fix for local
            AddImageAction addImageAction = SystemAction.get(AddImageAction.class);
            addImageAction.actionPerformed(null);
        }

        // if Cancel button is pressed
        if (isCancelled) {
            String createdDirectory = (String) wizardDescriptor.getProperty("createdDirectory"); //NON-NLS
            if(createdDirectory != null) {
                logger.log(Level.INFO, "Deleting a created case directory due to isCancelled set, dir: " + createdDirectory); //NON-NLS
                Case.deleteCaseDirectory(new File(createdDirectory));
            }
            // if there's case opened, close the case
View Full Code Here

     * When the wizard is finished, create a ReportGenerator with the wizard information,
     * and start all necessary reports.
     */
    @SuppressWarnings("unchecked")
    public static void doReportWizard() {
        WizardDescriptor wiz = new WizardDescriptor(new ReportWizardIterator());
        wiz.setTitleFormat(new MessageFormat("{0} {1}"));
        wiz.setTitle(NbBundle.getMessage(ReportWizardAction.class, "ReportWizardAction.reportWiz.title"));
        if (DialogDisplayer.getDefault().notify(wiz) == WizardDescriptor.FINISH_OPTION) {
            @SuppressWarnings("unchecked")
            ReportGenerator generator = new ReportGenerator((Map<TableReportModule, Boolean>)wiz.getProperty("tableModuleStates")//NON-NLS
                    (Map<GeneralReportModule, Boolean>)wiz.getProperty("generalModuleStates"), //NON-NLS
                    (Map<FileReportModule, Boolean>)wiz.getProperty("fileModuleStates")); //NON-NLS
            generator.generateTableReports((Map<ARTIFACT_TYPE, Boolean>)wiz.getProperty("artifactStates"), (Map<String, Boolean>)wiz.getProperty("tagStates")); //NON-NLS
            generator.generateFileListReports((Map<FileReportDataTypes, Boolean>)wiz.getProperty("fileReportOptions")); //NON-NLS
            generator.generateGeneralReports();
            generator.displayProgressPanels();
        }       
    }
View Full Code Here

        return instance;
    }

    public void performAction() {
        wizardIterator = new PanelsIterator();
        wizardDescriptor = new WizardDescriptor(wizardIterator);

        // {0} will be replaced by wizardDescriptor.Panel.getComponent().getName()
        wizardDescriptor.setTitleFormat(new MessageFormat("{0}")); // NOI18N
        wizardDescriptor.setTitle(org.openide.util.NbBundle.getMessage(CloneWizardAction.class, "CTL_Clone")); // NOI18N
        Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor);
View Full Code Here

    public boolean isEnabled() {
        return true;
    }

    protected void performAction(ActionEvent event) {
        WizardDescriptor wizard = new WizardDescriptor(getPanels());
        // {0} will be replaced by WizardDesriptor.Panel.getComponent().getName()
        wizard.setTitleFormat(new MessageFormat("{0}"));
        wizard.setTitle((String) getValue(Action.NAME));
        Dialog dialog = DialogDisplayer.getDefault().createDialog(wizard);
        dialog.setVisible(true);
        dialog.toFront();
        boolean cancelled = wizard.getValue() != WizardDescriptor.FINISH_OPTION;
        if (!cancelled) {
            if (builder.isValid())
                builder.build();
        }
    }
View Full Code Here

TOP

Related Classes of org.openide.WizardDescriptor

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.