本文整理汇总了Java中org.openide.WizardDescriptor.setTitleFormat方法的典型用法代码示例。如果您正苦于以下问题:Java WizardDescriptor.setTitleFormat方法的具体用法?Java WizardDescriptor.setTitleFormat怎么用?Java WizardDescriptor.setTitleFormat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.openide.WizardDescriptor
的用法示例。
在下文中一共展示了WizardDescriptor.setTitleFormat方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: showMakeSharableWizard
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
/**
* 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();
}
示例2: addPlatform
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
@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();
}
}
}
示例3: runProjectWizard
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
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;
}
示例4: show
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
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;
}
示例5: show
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
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;
}
示例6: show
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
boolean show () {
wizardIterator = new PanelsIterator();
wizardDescriptor = new WizardDescriptor(wizardIterator);
wizardDescriptor.setTitleFormat(new MessageFormat("{0}")); // NOI18N
wizardDescriptor.setTitle(org.openide.util.NbBundle.getMessage(FetchWizard.class, "LBL_FetchWizard.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();
wizardIterator.fetchBranchesStep.cancelBackgroundTasks();
}
}
return finnished;
}
示例7: show
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
public boolean show() {
wizardIterator = new PanelsIterator();
wizardDescriptor = new WizardDescriptor(wizardIterator);
wizardDescriptor.setTitleFormat(new MessageFormat("{0}")); // NOI18N
wizardDescriptor.setTitle(org.openide.util.NbBundle.getMessage(CheckoutWizard.class, "CTL_Checkout")); // NOI18N
Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor);
dialog.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CheckoutWizard.class, "CTL_Checkout"));
dialog.setVisible(true);
dialog.toFront();
Object value = wizardDescriptor.getValue();
boolean finnished = value == WizardDescriptor.FINISH_OPTION;
if(finnished) {
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
repositoryStep.stop();
}
}
return finnished;
}
示例8: initWizard
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
/** Initializes wizard descriptor. */
private void initWizard(WizardDescriptor wizardDesc) {
// Init properties.
wizardDesc.putProperty(WizardDescriptor.PROP_AUTO_WIZARD_STYLE, Boolean.TRUE);
wizardDesc.putProperty(WizardDescriptor.PROP_CONTENT_DISPLAYED, Boolean.TRUE);
wizardDesc.putProperty(WizardDescriptor.PROP_CONTENT_NUMBERED, Boolean.TRUE);
ArrayList contents = new ArrayList(3);
contents.add(Util.getString("TXT_SelectTestSources")); //NOI18N
contents.add(Util.getString("TXT_SelectTestResources")); //NOI18N
contents.add(Util.getString("TXT_FoundMissingResources")); //NOI18N
wizardDesc.putProperty(WizardDescriptor.PROP_CONTENT_DATA, (String[])contents.toArray(new String[contents.size()]));
wizardDesc.setTitle(Util.getString("LBL_TestWizardTitle")); //NOI18N
wizardDesc.setTitleFormat(new MessageFormat("{0} ({1})")); //NOI18N
wizardDesc.setModal(false);
}
示例9: initWizard
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
/** Initializes wizard descriptor. */
private void initWizard(WizardDescriptor wizardDesc) {
// Init properties.
wizardDesc.putProperty(WizardDescriptor.PROP_AUTO_WIZARD_STYLE, Boolean.TRUE);
wizardDesc.putProperty(WizardDescriptor.PROP_CONTENT_DISPLAYED, Boolean.TRUE);
wizardDesc.putProperty(WizardDescriptor.PROP_CONTENT_NUMBERED, Boolean.TRUE);
List<String> contents = new ArrayList<String>(4);
contents.add(Util.getString("TXT_SelectSourcesHelp")); //NOI18N
contents.add(Util.getString("TXT_SelectResourceHelp")); //NOI18N
contents.add(Util.getString("TXT_AdditionalHelp")); //NOI18N
contents.add(Util.getString("TXT_FoundStringsHelp")); //NOI18N
wizardDesc.putProperty(
WizardDescriptor.PROP_CONTENT_DATA,
contents.toArray(new String[contents.size()])
);
wizardDesc.setTitle(Util.getString("LBL_WizardTitle")); //NOI18N
wizardDesc.setTitleFormat(new MessageFormat("{0} ({1})")); // NOI18N
wizardDesc.setModal(false);
}
示例10: start
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
/** Starts Eclipse importer wizard. */
public void start() {
final EclipseWizardIterator iterator = new EclipseWizardIterator();
final WizardDescriptor wizardDescriptor = new WizardDescriptor(iterator);
iterator.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
wizardDescriptor.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE, // NOI18N
iterator.getErrorMessage());
}
});
wizardDescriptor.setTitleFormat(new java.text.MessageFormat("{1}")); // NOI18N
wizardDescriptor.setTitle(
ProjectImporterWizard.getMessage("CTL_WizardTitle")); // NOI18N
Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor);
dialog.setVisible(true);
dialog.toFront();
cancelled = wizardDescriptor.getValue() != WizardDescriptor.FINISH_OPTION;
if (!cancelled) {
projects = iterator.getProjects();
//showAdditionalInfo(projects);
destination = iterator.getDestination();
recursively = iterator.getRecursively();
numberOfImportedProjects = iterator.getNumberOfImportedProject();
extraPanels = iterator.getExtraPanels();
}
}
示例11: initWizardDescriptor
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
private void initWizardDescriptor() {
wizardDescriptor = new WizardDescriptor(this);
wizardDescriptor.setTitle(Bundle.ProfilingPointWizard_WizardTitle());
wizardDescriptor.setTitleFormat(new MessageFormat("{0}")); // NOI18N
wizardDescriptor.putProperty(WizardDescriptor.PROP_AUTO_WIZARD_STYLE, Boolean.TRUE); // NOI18N
wizardDescriptor.putProperty(WizardDescriptor.PROP_CONTENT_DISPLAYED, Boolean.TRUE); // NOI18N
wizardDescriptor.putProperty(WizardDescriptor.PROP_CONTENT_NUMBERED, Boolean.TRUE); // NOI18N
wizardDescriptor.putProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, Integer.valueOf(0)); // NOI18N
}
示例12: show
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
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;
}
示例13: show
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
@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);
}
}
示例14: show
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
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;
}
示例15: show
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
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;
}