本文整理汇总了Java中org.openide.WizardDescriptor.Iterator方法的典型用法代码示例。如果您正苦于以下问题:Java WizardDescriptor.Iterator方法的具体用法?Java WizardDescriptor.Iterator怎么用?Java WizardDescriptor.Iterator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.openide.WizardDescriptor
的用法示例。
在下文中一共展示了WizardDescriptor.Iterator方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: asInstantiatingIterator
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
@NonNull
private static Optional<WizardDescriptor.InstantiatingIterator<WizardDescriptor>> asInstantiatingIterator(
@NullAllowed final WizardDescriptor.Iterator<WizardDescriptor> it) {
return Optional.ofNullable(it)
.map((p)->{
return p instanceof WizardDescriptor.InstantiatingIterator ?
(WizardDescriptor.InstantiatingIterator<WizardDescriptor>) p:
null;
});
}
示例2: ImportImageWizard
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
private ImportImageWizard(WizardDescriptor.Iterator iterator) {
super(iterator);
wizardIterator = iterator;
putProperty(WizardDescriptor.PROP_AUTO_WIZARD_STYLE, Boolean.TRUE); // NOI18N
putProperty(WizardDescriptor.PROP_CONTENT_DISPLAYED, Boolean.TRUE); // NOI18N
putProperty(WizardDescriptor.PROP_CONTENT_NUMBERED, Boolean.TRUE); // NOI18N
setTitle(NbBundle.getMessage(ImportImageWizard.class, "ImportImageWizard.Title")); // NOI18N
setTitleFormat(new java.text.MessageFormat("{0}")); // NOI18N
putProperty(WizardDescriptor.PROP_CONTENT_DATA, // NOI18N
new String[] { NbBundle.getMessage(ImportImageWizard.class, "ImportImageWizard.Step1"), // NOI18N
NbBundle.getMessage(ImportImageWizard.class, "ImportImageWizard.Step2") }); // NOI18N
}
示例3: getSimpleIterator
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
private WizardDescriptor.Iterator<WizardDescriptor> getSimpleIterator () {
if (simpleIterator == null) {
assert panel != null;
simpleIterator = new WizardDescriptor.ArrayIterator<WizardDescriptor>(Collections.singletonList(panel));
}
return simpleIterator;
}
示例4: implInvokeWizard
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
private boolean implInvokeWizard (WizardDescriptor.Iterator<WizardDescriptor> iterator) {
WizardDescriptor wizardDescriptor = new WizardDescriptor (iterator);
wizardDescriptor.setModal (true);
wizardDescriptor.setTitleFormat (new MessageFormat(NbBundle.getMessage (InstallUnitWizard.class, "InstallUnitWizard_MessageFormat")));
wizardDescriptor.setTitle (NbBundle.getMessage (InstallUnitWizard.class, "InstallUnitWizard_Title"));
Dialog dialog = DialogDisplayer.getDefault ().createDialog (wizardDescriptor);
dialog.setVisible (true);
dialog.toFront ();
boolean cancelled = wizardDescriptor.getValue() != WizardDescriptor.FINISH_OPTION;
log.log (Level.FINE, "InstallUnitWizard returns with value " + wizardDescriptor.getValue ());
return !cancelled;
}
示例5: getWizardIterator
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
/** Gets wizard iterator thru panels used in wizard invoked by this action,
* i.e I18N wizard. */
private WizardDescriptor.Iterator getWizardIterator() {
WizardDescriptor.Panel[] panels = new WizardDescriptor.Panel[3];
panels[0] = new SourceWizardPanel.Panel(true);
panels[1] = new ResourceWizardPanel.Panel(true);
panels[2] = new TestStringWizardPanel.Panel();
return new WizardDescriptor.ArrayIterator(panels);
}
示例6: I18nWizardDescriptor
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
/** Creates new I18nWizardDescriptor */
private I18nWizardDescriptor(WizardDescriptor.Iterator<Settings> panels, Settings settings) {
super(panels, settings);
this.panels = panels;
this.settings = settings;
}
示例7: getWizardIterator
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
/** Gets wizard iterator thru panels used in wizard invoked by this action,
* i.e I18N wizard. */
private WizardDescriptor.Iterator<I18nWizardDescriptor.Settings> getWizardIterator() {
List<WizardDescriptor.Panel<I18nWizardDescriptor.Settings>> panels
= new ArrayList<WizardDescriptor.Panel<I18nWizardDescriptor.Settings>>(4);
panels.add(new SourceWizardPanel.Panel());
panels.add(new ResourceWizardPanel.Panel());
panels.add(new AdditionalWizardPanel.Panel());
panels.add(new HardStringWizardPanel.Panel());
return new WizardDescriptor.ArrayIterator<I18nWizardDescriptor.Settings>(
panels.toArray(new WizardDescriptor.Panel[panels.size()])
);
}
示例8: createPanels
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
private WizardDescriptor.Panel[] createPanels (
@NonNull final WizardDescriptor wizardDescriptor,
@NonNull final WizardDescriptor.Iterator<WizardDescriptor> it) {
// Ask for Java folders
Project project = Templates.getProject( wizardDescriptor );
if (project == null) throw new NullPointerException ("No project found for: " + wizardDescriptor);
Sources sources = ProjectUtils.getSources(project);
SourceGroup[] groups = sources.getSourceGroups(JavaProjectConstants.SOURCES_TYPE_JAVA);
assert groups != null : "Cannot return null from Sources.getSourceGroups: " + sources;
groups = checkNotNull (groups, sources);
if (groups.length == 0) {
groups = sources.getSourceGroups( Sources.TYPE_GENERIC );
groups = checkNotNull (groups, sources);
return new WizardDescriptor.Panel[] {
Templates.buildSimpleTargetChooser(project, groups).create(),
};
}
else {
final List<WizardDescriptor.Panel<?>> panels = new ArrayList<>();
if (this.type == Type.FILE) {
panels.add(JavaTemplates.createPackageChooser( project, groups ));
} else if (type == Type.PKG_INFO) {
panels.add(new JavaTargetChooserPanel(project, groups, null, Type.PKG_INFO, true));
} else if (type == Type.MODULE_INFO) {
panels.add(new JavaTargetChooserPanel(project, groups, null, Type.MODULE_INFO, false));
} else {
assert type == Type.PACKAGE;
SourceGroup[] groovySourceGroups = sources.getSourceGroups(SOURCE_TYPE_GROOVY);
if (groovySourceGroups.length > 0) {
List<SourceGroup> all = new ArrayList<>();
all.addAll(Arrays.asList(groups));
all.addAll(Arrays.asList(groovySourceGroups));
groups = all.toArray(new SourceGroup[all.size()]);
}
SourceGroup[] resources = sources.getSourceGroups(JavaProjectConstants.SOURCES_TYPE_RESOURCES);
assert resources != null;
if (resources.length > 0) { // #161244
List<SourceGroup> all = new ArrayList<SourceGroup>();
all.addAll(Arrays.asList(groups));
all.addAll(Arrays.asList(resources));
groups = all.toArray(new SourceGroup[all.size()]);
}
panels.add(new JavaTargetChooserPanel(project, groups, null, Type.PACKAGE, false));
}
if (it != null) {
if (it.current() != null) {
panels.add(it.current());
}
while(it.hasNext()) {
it.nextPanel();
panels.add(it.current());
}
}
return panels.toArray(new WizardDescriptor.Panel<?>[panels.size()]);
}
}
示例9: invokeWizard
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
public boolean invokeWizard (InstallUnitWizardModel model, boolean allowRunInBackground) {
WizardDescriptor.Iterator<WizardDescriptor> iterator;
iterator = new InstallUnitWizardIterator (model, true, allowRunInBackground);
return implInvokeWizard (iterator);
}
示例10: createI18nWizardDescriptor
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
/** Creates I18N wizard descriptor.
* @return <code>I18nWizardDescriptor</code> instance. */
static WizardDescriptor createI18nWizardDescriptor(WizardDescriptor.Iterator<Settings> panels, Settings settings) {
return new I18nWizardDescriptor(panels, settings);
}