Package org.openide

Examples of org.openide.WizardDescriptor


            wizardDescriptor.putProperty ("NewProjectWizard_Title", substitute); // NOI18N
        }
    }
   
    public void storeSettings(Object settings) {
        WizardDescriptor d = (WizardDescriptor)settings;
        component.store(d);
        d.putProperty ("NewProjectWizard_Title", null); // NOI18N
    }
View Full Code Here


    public boolean isValid() {
        return true;
    }

    public void storeSettings(Object wiz) {
        WizardDescriptor w = (WizardDescriptor) wiz;
        w.putProperty(ProjectProperties.INCLUDES, viz.getIncludePattern());
        w.putProperty(ProjectProperties.EXCLUDES, viz.getExcludePattern());
    }
View Full Code Here

        w.putProperty(ProjectProperties.INCLUDES, viz.getIncludePattern());
        w.putProperty(ProjectProperties.EXCLUDES, viz.getExcludePattern());
    }

    public void readSettings(Object wiz) {
        WizardDescriptor w = (WizardDescriptor) wiz;
        String includes = (String) w.getProperty(ProjectProperties.INCLUDES);
        if (includes == null) {
            includes = "**"; // NOI18N
        }
        viz.setIncludePattern(includes);
        String excludes = (String) w.getProperty(ProjectProperties.EXCLUDES);
        if (excludes == null) {
            excludes = ""; // NOI18N
        }
        viz.setExcludePattern(excludes);
        File[] sourceRoots = (File[]) w.getProperty("sourceRoot");
        File[] testRoots = (File[]) w.getProperty("testRoot");
        File[] roots = new File[sourceRoots.length + testRoots.length];
        System.arraycopy(sourceRoots, 0, roots, 0, sourceRoots.length);
        System.arraycopy(testRoots, 0, roots, sourceRoots.length, testRoots.length);
        viz.setRoots(roots);
    }
View Full Code Here

        }
    }//GEN-LAST:event_removePlatform

    private void addNewPlatform(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addNewPlatform
        try {
            WizardDescriptor wiz = new WizardDescriptor (PlatformInstallIterator.create());
            DataObject template = DataObject.find (FileUtil.getConfigFile(TEMPLATE));
            wiz.putProperty("targetTemplate", template);    //NOI18N
            DataFolder folder = DataFolder.findFolder(FileUtil.getConfigFile(STORAGE));
            wiz.putProperty("targetFolder",folder); //NOI18N
            wiz.putProperty("WizardPanel_autoWizardStyle", Boolean.TRUE); // NOI18N
            wiz.putProperty("WizardPanel_contentDisplayed", Boolean.TRUE); // NOI18N
            wiz.putProperty("WizardPanel_contentNumbered", Boolean.TRUE); // NOI18N
            wiz.setTitle(NbBundle.getMessage(PlatformsCustomizer.class,"CTL_AddPlatformTitle"));
            wiz.setTitleFormat(new java.text.MessageFormat("{0}")); // NOI18N
            Dialog dlg = DialogDisplayer.getDefault().createDialog(wiz);
            try {
                dlg.setVisible(true);
                if (wiz.getValue() == WizardDescriptor.FINISH_OPTION) {
                    this.getChildren().refreshPlatforms();
                    Set result = wiz.getInstantiatedObjects();
                    this.expandPlatforms (result.size() == 0 ? null : (ScalaPlatform)result.iterator().next());
                }
            } finally {
                dlg.dispose();
            }
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

public class OfficeModule extends ModuleInstall {

    private static final long serialVersionUID = -8499324854301243852L;

    public void installed () {
        WizardDescriptor wiz = new InstallationPathDescriptor();
        TopManager.getDefault().createDialog(wiz).show();

        if(wiz.getValue() == NotifyDescriptor.OK_OPTION) {
            OfficeInstallation oi = (OfficeInstallation)
                wiz.getProperty(InstallationPathDescriptor.PROP_INSTALLPATH);

            OfficeSettings settings = OfficeSettings.getDefault();
            settings.setOfficeDirectory(oi);
        }
        FrameworkJarChecker.mountDependencies();
View Full Code Here

public final class ExportWizardWizardAction extends CallableSystemAction {

    private WizardDescriptor.Panel[] panels;

    public void performAction() {
        WizardDescriptor wizardDescriptor = new WizardDescriptor(getPanels());
        // {0} will be replaced by WizardDesriptor.Panel.getComponent().getName()
        wizardDescriptor.setTitleFormat(new MessageFormat("{0}"));
        wizardDescriptor.setTitle("Your wizard dialog title here");
        Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor);
        dialog.setVisible(true);
        dialog.toFront();
        boolean cancelled = wizardDescriptor.getValue() != WizardDescriptor.FINISH_OPTION;
        if (!cancelled) {
            // do something
        }
    }
View Full Code Here

   

    //Read from WizardDescriptor and put it in Panel
    public void readSettings(Object settings) {
        if (settings instanceof WizardDescriptor) {
            WizardDescriptor desc = (WizardDescriptor) settings;
            String archiveName = (String) desc.getProperty("ARCHIVE_OPTIONS_ARCHIVE_NAME");
            ExportWizardVisualPanel1 panel = (ExportWizardVisualPanel1) getComponent();
            if (archiveName != null && !archiveName.trim().equals("")) {
                panel.setArchiveName(archiveName);
            }

            FileObject fobj = (FileObject) desc.getProperty("ARCHIVE_OPTIONS_ARCHIVE_DESTINATION");
            if (fobj != null) {
                panel.setDestinationFolder(fobj);
            }
        }
    }
View Full Code Here

        }
    }
    //Read from Panel and put it in WizardDescriptor;
    public void storeSettings(Object settings) {
        if (settings instanceof WizardDescriptor) {
            WizardDescriptor desc = (WizardDescriptor) settings;
            ExportWizardVisualPanel1 panel = (ExportWizardVisualPanel1) getComponent();
            String archiveName = panel.getArchiveName();
            if (archiveName != null && !archiveName.trim().equals("")) {
                desc.putProperty("ARCHIVE_OPTIONS_ARCHIVE_NAME", archiveName);
            }

            FileObject fobj = panel.getDestinationFolder();
            if (fobj != null) {
                desc.putProperty("ARCHIVE_OPTIONS_ARCHIVE_DESTINATION", fobj);
            }

            String ext = NbBundle.getMessage(ExportWizardVisualPanel1.class, "ExportWizardVisualPanel1.jLabel3.text");
            desc.putProperty("ARCHIVE_OPTIONS_ARCHIVE_EXTENSION", ext);
        }
    }
View Full Code Here

            if (dataObject.getPrimaryFile() != null) {

                WizardDescriptor.Panel[] _panels = getPanels();

                WizardDescriptor wizardDescriptor = new WizardDescriptor(_panels);
                // {0} will be replaced by WizardDesriptor.Panel.getComponent().getName()
                wizardDescriptor.setTitleFormat(new MessageFormat(_panels[0].getComponent().getName()));

                wizardDescriptor.setTitle(_panels[0].getComponent().getName());


                //set initial properties
                FileObject primaryFile = dataObject.getPrimaryFile();
                String archiveName = primaryFile.getNameExt();
                FileObject destinationFolder = primaryFile.getParent();

                wizardDescriptor.putProperty("ARCHIVE_OPTIONS_ARCHIVE_NAME", archiveName);
                wizardDescriptor.putProperty("ARCHIVE_OPTIONS_ARCHIVE_DESTINATION", destinationFolder);

                Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor);
                dialog.setVisible(true);
                dialog.toFront();
                boolean cancelled = wizardDescriptor.getValue() != WizardDescriptor.FINISH_OPTION;
                if (!cancelled) {
                    // do something
                    try {
                        //First get the archive name. (ArchiveName + ext)

                        archiveName = wizardDescriptor.getProperty("ARCHIVE_OPTIONS_ARCHIVE_NAME") + "";
                        String archiveExt = wizardDescriptor.getProperty("ARCHIVE_OPTIONS_ARCHIVE_EXTENSION") + "";

                        //second get the destination folder
                        destinationFolder = (FileObject) wizardDescriptor.getProperty("ARCHIVE_OPTIONS_ARCHIVE_DESTINATION");

                        createAndExecuteAntScript(primaryFile, destinationFolder, archiveName + archiveExt);
                    //third create and execute ant script passing the above as parameters
                    } catch (IOException ex) {
                        Exceptions.printStackTrace(ex);
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.