Java Code Examples for org.openide.WizardDescriptor#setTitleFormat()
The following examples show how to use
org.openide.WizardDescriptor#setTitleFormat() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ConvertOgreBinaryMeshesAction.java From MikuMikuStudio with BSD 2-Clause "Simplified" License | 6 votes |
public void actionPerformed(ActionEvent ev) { final WizardDescriptor wizardDescriptor = new WizardDescriptor(getPanels()); // {0} will be replaced by WizardDesriptor.Panel.getComponent().getName() wizardDescriptor.setTitleFormat(new MessageFormat("{0}")); wizardDescriptor.setTitle("Convert Ogre Binary Meshes"); wizardDescriptor.putProperty("project", context); Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor); dialog.setVisible(true); dialog.toFront(); boolean cancelled = wizardDescriptor.getValue() != WizardDescriptor.FINISH_OPTION; final boolean deleteFiles = (Boolean) wizardDescriptor.getProperty("deleteoriginal"); if (!cancelled) { new Thread(new Runnable() { public void run() { scanDir(((AssetPackProject) context).getAssetsFolder().getPath(), deleteFiles); } }).start(); } }
Example 2
Source File: PullWizard.java From netbeans with Apache License 2.0 | 6 votes |
boolean show () { wizardIterator = new PanelsIterator(); wizardDescriptor = new WizardDescriptor(wizardIterator); wizardDescriptor.setTitleFormat(new MessageFormat("{0}")); // NOI18N wizardDescriptor.setTitle(org.openide.util.NbBundle.getMessage(PullWizard.class, "LBL_PullWizard.title")); // NOI18N Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor); setErrorMessage(wizardIterator.selectUriStep.getErrorMessage()); dialog.setVisible(true); dialog.toFront(); Object value = wizardDescriptor.getValue(); boolean finnished = value == WizardDescriptor.FINISH_OPTION; if (!finnished) { // wizard wasn't properly finnished ... if (value == WizardDescriptor.CLOSED_OPTION || value == WizardDescriptor.CANCEL_OPTION ) { // wizard was closed or canceled -> reset all steps & kill all running tasks wizardIterator.selectUriStep.cancelBackgroundTasks(); } } return finnished; }
Example 3
Source File: PushWizard.java From netbeans with Apache License 2.0 | 6 votes |
boolean show () { wizardIterator = new PanelsIterator(); wizardDescriptor = new WizardDescriptor(wizardIterator); wizardDescriptor.setTitleFormat(new MessageFormat("{0}")); // NOI18N wizardDescriptor.setTitle(org.openide.util.NbBundle.getMessage(PushWizard.class, "LBL_PushWizard.title")); // NOI18N Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor); setErrorMessage(wizardIterator.selectUriStep.getErrorMessage()); dialog.setVisible(true); dialog.toFront(); Object value = wizardDescriptor.getValue(); boolean finnished = value == WizardDescriptor.FINISH_OPTION; if (!finnished) { // wizard wasn't properly finnished ... if (value == WizardDescriptor.CLOSED_OPTION || value == WizardDescriptor.CANCEL_OPTION ) { // wizard was closed or canceled -> reset all steps & kill all running tasks wizardIterator.selectUriStep.cancelBackgroundTasks(); } } return finnished; }
Example 4
Source File: ApisupportAntUIUtils.java From netbeans with Apache License 2.0 | 6 votes |
public static @CheckForNull NbModuleProject runProjectWizard( final NewNbModuleWizardIterator iterator, final String titleBundleKey) { WizardDescriptor wd = new WizardDescriptor(iterator); wd.setTitleFormat(new MessageFormat("{0}")); // NOI18N wd.setTitle(NbBundle.getMessage(ApisupportAntUIUtils.class, titleBundleKey)); Dialog dialog = DialogDisplayer.getDefault().createDialog(wd); dialog.setVisible(true); dialog.toFront(); NbModuleProject project = null; boolean cancelled = wd.getValue() != WizardDescriptor.FINISH_OPTION; if (!cancelled) { FileObject folder = iterator.getCreateProjectFolder(); if (folder == null) { return null; } try { project = (NbModuleProject) ProjectManager.getDefault().findProject(folder); OpenProjects.getDefault().open(new Project[] { project }, false); } catch (IOException e) { ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e); } } return project; }
Example 5
Source File: NbPlatformCustomizer.java From netbeans with Apache License 2.0 | 6 votes |
@Messages("CTL_AddNetbeansPlatformTitle=Add NetBeans Platform") private void addPlatform(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addPlatform PlatformChooserWizardPanel chooser = new PlatformChooserWizardPanel(null); PlatformInfoWizardPanel info = new PlatformInfoWizardPanel(null); WizardDescriptor wd = new WizardDescriptor(new BasicWizardPanel[] {chooser, info}); initPanel(chooser, wd, 0); initPanel(info, wd, 1); wd.setTitleFormat(new MessageFormat("{0}")); // NOI18N Dialog dialog = DialogDisplayer.getDefault().createDialog(wd); dialog.setTitle(CTL_AddNetbeansPlatformTitle()); dialog.setVisible(true); dialog.toFront(); if (wd.getValue() == WizardDescriptor.FINISH_OPTION) { String plafDir = (String) wd.getProperty(PLAF_DIR_PROPERTY); String plafLabel = (String) wd.getProperty(PLAF_LABEL_PROPERTY); String id = plafLabel.replace(' ', '_'); NbPlatform plaf = getPlafListModel().addPlatform(id, plafDir, plafLabel); if (plaf != null) { platformsList.setSelectedValue(plaf, true); refreshPlatform(); } } }
Example 6
Source File: SharableLibrariesUtils.java From netbeans with Apache License 2.0 | 6 votes |
/** * Show a multistep wizard for converting a non-sharable project to a sharable, self-contained one. * @param helper * @param ref * @param libraryNames * @param jarReferences * @return true is migration was performed, false when aborted. */ @Messages({ "TIT_MakeSharableWizard=New Libraries Folder", "ACSD_MakeSharableWizard=Wizard dialog that guides you through the process of making the project self-contained and sharable in respect to binary dependencies." }) public static boolean showMakeSharableWizard(final AntProjectHelper helper, ReferenceHelper ref, List<String> libraryNames, List<String> jarReferences) { final CopyIterator cpIt = new CopyIterator(helper); final WizardDescriptor wizardDescriptor = new WizardDescriptor(cpIt); // {0} will be replaced by WizardDesriptor.Panel.getComponent().getName() wizardDescriptor.setTitleFormat(new MessageFormat("{0}")); wizardDescriptor.setTitle(TIT_MakeSharableWizard()); wizardDescriptor.putProperty(PROP_HELPER, helper); wizardDescriptor.putProperty(PROP_REFERENCE_HELPER, ref); wizardDescriptor.putProperty(PROP_LIBRARIES, libraryNames); wizardDescriptor.putProperty(PROP_JAR_REFS, jarReferences); Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor); dialog.getAccessibleContext().setAccessibleDescription(ACSD_MakeSharableWizard()); dialog.setVisible(true); dialog.toFront(); return wizardDescriptor.getValue() == WizardDescriptor.FINISH_OPTION && cpIt.isSuccess(); }
Example 7
Source File: ImportAssetAction.java From MikuMikuStudio with BSD 2-Clause "Simplified" License | 5 votes |
public void actionPerformed(ActionEvent ev) { WizardDescriptor wizardDescriptor = new WizardDescriptor(getPanels()); // {0} will be replaced by WizardDesriptor.Panel.getComponent().getName() wizardDescriptor.setTitleFormat(new MessageFormat("{0}")); wizardDescriptor.setTitle("Import Asset to AssetPack.."); wizardDescriptor.putProperty("project", context); Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor); dialog.setVisible(true); dialog.toFront(); boolean cancelled = wizardDescriptor.getValue() != WizardDescriptor.FINISH_OPTION; if (!cancelled) { importAsset(wizardDescriptor); } }
Example 8
Source File: AddTerrainAction.java From MikuMikuStudio with BSD 2-Clause "Simplified" License | 5 votes |
@Override protected Object showWizard(org.openide.nodes.Node node) { WizardDescriptor wizardDescriptor = new WizardDescriptor(getPanels()); wizardDescriptor.setTitleFormat(new MessageFormat("{0}")); wizardDescriptor.setTitle("Terrain Wizard"); wizardDescriptor.putProperty("main_node", node); Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor); dialog.setVisible(true); dialog.toFront(); boolean cancelled = wizardDescriptor.getValue() != WizardDescriptor.FINISH_OPTION; if (!cancelled) { return wizardDescriptor; } return null; }
Example 9
Source File: CodelessProjectWizardAction.java From MikuMikuStudio with BSD 2-Clause "Simplified" License | 5 votes |
public void performAction() { WizardDescriptor wizardDescriptor = new WizardDescriptor(getPanels()); // {0} will be replaced by WizardDesriptor.Panel.getComponent().getName() wizardDescriptor.setTitleFormat(new MessageFormat("{0}")); wizardDescriptor.setTitle("Import External Project Assets"); Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor); dialog.setVisible(true); dialog.toFront(); boolean cancelled = wizardDescriptor.getValue() != WizardDescriptor.FINISH_OPTION; if (!cancelled) { createProjectSettings(wizardDescriptor); } }
Example 10
Source File: AddSkyboxAction.java From MikuMikuStudio with BSD 2-Clause "Simplified" License | 5 votes |
@Override protected Object showWizard(org.openide.nodes.Node node) { WizardDescriptor wizardDescriptor = new WizardDescriptor(getPanels()); wizardDescriptor.setTitleFormat(new MessageFormat("{0}")); wizardDescriptor.setTitle("Skybox Wizard"); Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor); dialog.setVisible(true); dialog.toFront(); boolean cancelled = wizardDescriptor.getValue() != WizardDescriptor.FINISH_OPTION; if (!cancelled) { return wizardDescriptor; } return null; }
Example 11
Source File: CreateTerrainWizardAction.java From MikuMikuStudio with BSD 2-Clause "Simplified" License | 5 votes |
public void performAction() { WizardDescriptor wizardDescriptor = new WizardDescriptor(getPanels()); // {0} will be replaced by WizardDesriptor.Panel.getComponent().getName() wizardDescriptor.setTitleFormat(new MessageFormat("{0}")); wizardDescriptor.setTitle("Terrain Wizard"); Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor); dialog.setVisible(true); dialog.toFront(); boolean cancelled = wizardDescriptor.getValue() != WizardDescriptor.FINISH_OPTION; if (!cancelled) { controller.generateTerrain(wizardDescriptor); } }
Example 12
Source File: CloneWizard.java From netbeans with Apache License 2.0 | 5 votes |
boolean show () { wizardIterator = new PanelsIterator(); wizardDescriptor = new WizardDescriptor(wizardIterator); wizardDescriptor.setTitleFormat(new MessageFormat("{0}")); // NOI18N wizardDescriptor.setTitle(org.openide.util.NbBundle.getMessage(CloneWizard.class, "LBL_CloneWizard.title")); // NOI18N Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor); if(pa != null && forPath != null) { Git.getInstance().getRequestProcessor().post(new Runnable() { @Override public void run () { wizardIterator.repositoryStep.waitPopulated(); // url and credential already provided, so try // to reach the next step ... EventQueue.invokeLater(new Runnable() { @Override public void run() { wizardDescriptor.doNextClick(); } }); } }); } setErrorMessage(wizardIterator.repositoryStep.getErrorMessage()); dialog.setVisible(true); dialog.toFront(); Object value = wizardDescriptor.getValue(); boolean finished = value == WizardDescriptor.FINISH_OPTION; if (finished) { onFinished(); } else { // wizard wasn't properly finnished ... if (value == WizardDescriptor.CLOSED_OPTION || value == WizardDescriptor.CANCEL_OPTION ) { // wizard was closed or canceled -> reset all steps & kill all running tasks wizardIterator.repositoryStep.cancelBackgroundTasks(); } } return finished; }
Example 13
Source File: PublishAssetPackAction.java From MikuMikuStudio with BSD 2-Clause "Simplified" License | 5 votes |
public void actionPerformed(ActionEvent ev) { final WizardDescriptor wizardDescriptor = new WizardDescriptor(getPanels()); // {0} will be replaced by WizardDesriptor.Panel.getComponent().getName() wizardDescriptor.setTitleFormat(new MessageFormat("{0}")); wizardDescriptor.setTitle("Publish AssetPack"); wizardDescriptor.putProperty("project", context); String projectName = ((AssetPackProject) context).getProjectName().replaceAll(" ", "_") + ".zip"; wizardDescriptor.putProperty("filename", projectName); Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor); dialog.setVisible(true); dialog.toFront(); boolean cancelled = wizardDescriptor.getValue() != WizardDescriptor.FINISH_OPTION; if (!cancelled) { new Thread(new Runnable() { public void run() { ProgressHandle handle = ProgressHandleFactory.createHandle("Publishing AssetPack.."); handle.start(); packZip(wizardDescriptor); copyData(wizardDescriptor); handle.progress("Uploading AssetPack.."); uploadData(wizardDescriptor); cleanup(wizardDescriptor); handle.finish(); } }).start(); } }
Example 14
Source File: RunTagWizard.java From netbeans with Apache License 2.0 | 5 votes |
@NbBundle.Messages({ "MSG_ReceivingImageInfo=Receiving Image Details", "LBL_Run=Run {0}" }) public void show() { DockerImageDetail info = BaseProgressUtils.showProgressDialogAndRun( new DockerImageInfoRunnable(tag.getImage()), Bundle.MSG_ReceivingImageInfo(), false); List<WizardDescriptor.Panel<WizardDescriptor>> panels = new ArrayList<>(); panels.add(new RunContainerPropertiesPanel(info)); panels.add(new RunPortBindingsPanel(info)); String[] steps = new String[panels.size()]; for (int i = 0; i < panels.size(); i++) { JComponent c = (JComponent) panels.get(i).getComponent(); // Default step name to component name of panel. steps[i] = c.getName(); c.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, i); c.putClientProperty(WizardDescriptor.PROP_CONTENT_DATA, steps); c.putClientProperty(WizardDescriptor.PROP_AUTO_WIZARD_STYLE, true); c.putClientProperty(WizardDescriptor.PROP_CONTENT_DISPLAYED, true); c.putClientProperty(WizardDescriptor.PROP_CONTENT_NUMBERED, true); } final WizardDescriptor wiz = new WizardDescriptor(new WizardDescriptor.ArrayIterator<>(panels)); // {0} will be replaced by WizardDesriptor.Panel.getComponent().getName() wiz.setTitleFormat(new MessageFormat("{0}")); wiz.setTitle(Bundle.LBL_Run(getImage(tag))); if (DialogDisplayer.getDefault().notify(wiz) == WizardDescriptor.FINISH_OPTION) { run(tag, wiz); } }
Example 15
Source File: URLPatternWizard.java From netbeans with Apache License 2.0 | 5 votes |
public boolean show() { wizardIterator = new PanelsIterator(); wizardDescriptor = new WizardDescriptor(wizardIterator); wizardDescriptor.setTitleFormat(new MessageFormat("{0}")); // NOI18N wizardDescriptor.setTitle(org.openide.util.NbBundle.getMessage(URLPatternWizard.class, "CTL_URLPattern")); // NOI18N Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor); dialog.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(URLPatternWizard.class, "CTL_URLPattern")); // NOI18N dialog.setVisible(true); dialog.toFront(); return wizardDescriptor.getValue() == WizardDescriptor.FINISH_OPTION; }
Example 16
Source File: ImportWizard.java From netbeans with Apache License 2.0 | 5 votes |
public boolean show() { wizardIterator = new PanelsIterator(); wizardDescriptor = new WizardDescriptor(wizardIterator); wizardDescriptor.setTitleFormat(new MessageFormat("{0}")); // NOI18N wizardDescriptor.setTitle(org.openide.util.NbBundle.getMessage(ImportWizard.class, "CTL_Import")); // NOI18N Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor); dialog.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ImportWizard.class, "CTL_Import")); dialog.setVisible(true); dialog.toFront(); Object value = wizardDescriptor.getValue(); boolean finnished = value == WizardDescriptor.FINISH_OPTION; if(!finnished) { // wizard wasn't properly finnished ... if(value == WizardDescriptor.CLOSED_OPTION || value == WizardDescriptor.CANCEL_OPTION ) { // wizard was closed or canceled -> reset all steps & kill all running tasks repositoryStep.stop(); importStep.stop(); importPreviewStep.stop(); } } else if (value == WizardDescriptor.FINISH_OPTION) { if(wizardIterator.current() == importStep) { setupImportPreviewStep(true); } else if (wizardIterator.current() == importPreviewStep) { importPreviewStep.storeTableSorter(); importPreviewStep.startCommitTask(repositoryStep.getRepositoryFile().getRepositoryUrl()); } } return finnished; }
Example 17
Source File: BloomWizardAction.java From MikuMikuStudio with BSD 2-Clause "Simplified" License | 5 votes |
public @Override void actionPerformed(ActionEvent e) { 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 } }
Example 18
Source File: AddConnectionWizard.java From netbeans with Apache License 2.0 | 5 votes |
private AddConnectionWizard(JDBCDriver driver, String databaseUrl, String user, String password) { this.databaseUrl = databaseUrl; this.user = user; this.pwd = password; wd = new WizardDescriptor(this, this); // {0} will be replaced by WizardDesriptor.Panel.getComponent().getName() wd.setTitleFormat(new MessageFormat("{0}")); wd.setTitle(NbBundle.getMessage(AddConnectionWizard.class, "PredefinedWizard.WizardTitle")); // NOI18N updateState(driver); }
Example 19
Source File: ImportModel.java From MikuMikuStudio with BSD 2-Clause "Simplified" License | 5 votes |
public void actionPerformed(ActionEvent ev) { final WizardDescriptor wiz = new WizardDescriptor(getPanels()); // {0} will be replaced by WizardDesriptor.Panel.getComponent().getName() wiz.setTitleFormat(new MessageFormat("{0}")); wiz.setTitle("Import Model to Project"); wiz.putProperty("project", context); Dialog dialog = DialogDisplayer.getDefault().createDialog(wiz); dialog.setVisible(true); dialog.toFront(); boolean cancelled = wiz.getValue() != WizardDescriptor.FINISH_OPTION; ((ModelImporterWizardPanel1) panels[0]).cleanup(); if (!cancelled) { new Thread(new Runnable() { public void run() { ProgressHandle handle = ProgressHandleFactory.createHandle("Importing Model.."); handle.start(); try { copyModel(wiz); } catch (Exception e) { Exceptions.printStackTrace(e); } handle.finish(); } }).start(); } }
Example 20
Source File: CreateSiteTemplate.java From netbeans with Apache License 2.0 | 4 votes |
public static void showWizard(ClientSideProject p) { WizardDescriptor wd = new WizardDescriptor(new WizardIterator(p)); wd.setTitleFormat(new MessageFormat("{0}")); //NOI18N wd.setTitle(Bundle.CreateSiteTemplate_WizardTitle()); DialogDisplayer.getDefault().notify(wd); }