本文整理汇总了Java中org.openide.WizardDescriptor.Panel方法的典型用法代码示例。如果您正苦于以下问题:Java WizardDescriptor.Panel方法的具体用法?Java WizardDescriptor.Panel怎么用?Java WizardDescriptor.Panel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.openide.WizardDescriptor
的用法示例。
在下文中一共展示了WizardDescriptor.Panel方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createPanels
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
private List<WizardDescriptor.Panel<ShortcutWizard>> createPanels() {
List<WizardDescriptor.Panel<ShortcutWizard>> _panels = new ArrayList<WizardDescriptor.Panel<ShortcutWizard>>();
_panels.add(new IntroPanel.IntroWizardPanel());
_panels.add(new SelectFolderPanel.SelectFolderWizardPanel(
NbBundle.getMessage(ShortcutIterator.class, "SI_LBL_select_menu_to_add_to"),
NbBundle.getMessage(ShortcutIterator.class, "SI_TEXT_menu_locn"),
NbBundle.getMessage(ShortcutIterator.class, "SI_LBL_display_name_for_menu"),
DataFolder.findFolder(FileUtil.getConfigFile("Menu")), // NOI18N
true, ShortcutWizard.PROP_FOLDER_MENU));
_panels.add(new SelectFolderPanel.SelectFolderWizardPanel(
NbBundle.getMessage(ShortcutIterator.class, "SI_LBL_select_toolbar"),
NbBundle.getMessage(ShortcutIterator.class, "SI_TEXT_toolbar_locn"),
NbBundle.getMessage(ShortcutIterator.class, "SI_LBL_display_name_for_toolbar"),
DataFolder.findFolder(FileUtil.getConfigFile("Toolbars")), // NOI18N
false, ShortcutWizard.PROP_FOLDER_TOOL));
_panels.add(new SelectKeyboardShortcutPanel.SelectKeyboardShortcutWizardPanel());
_panels.add(new CustomizeScriptPanel.CustomizeScriptWizardPanel());
return _panels;
}
示例2: current
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
/**
* Returns current panel of the wizard.
*
* @return current panel of the wizard.
*/
@Override
public WizardDescriptor.Panel current() {
String title = NbBundle.getMessage(MasterDetailWizard.class, "TITLE_MasterDetail"); // NOI18N
wizard.putProperty("NewFileWizard_Title", title); // NOI18N
if (steps == null) {
initSteps();
}
WizardDescriptor.Panel panel;
if (panelIndex < beforeStepsNo) {
panel = delegateIterator.current();
} else {
panel = panels[panelIndex-beforeStepsNo];
}
JComponent comp = (JComponent)panel.getComponent();
if ((panelIndex < beforeStepsNo) || (comp.getClientProperty(WIZARD_PANEL_CONTENT_DATA) == null)) {
comp.putClientProperty(WIZARD_PANEL_CONTENT_DATA, steps);
}
if (comp.getClientProperty(WIZARD_PANEL_CONTENT_SELECTED_INDEX) == null) {
comp.putClientProperty(WIZARD_PANEL_CONTENT_SELECTED_INDEX, panelIndex);
}
return panel;
}
示例3: createPanels
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
private WizardDescriptor.Panel[] createPanels(final WizardDescriptor wizardDescriptor) {
// Ask for Java folders
Project project = Templates.getProject(wizardDescriptor);
Sources sources = ProjectUtils.getSources(project);
SourceGroup[] groups = getTestRoots(sources);
if (groups.length == 0) {
if (SourceGroupModifier.createSourceGroup(project, JavaProjectConstants.SOURCES_TYPE_JAVA, JavaProjectConstants.SOURCES_HINT_TEST) != null) {
groups = getTestRoots(sources);
}
}
if (groups.length == 0) {
groups = sources.getSourceGroups(Sources.TYPE_GENERIC);
return new WizardDescriptor.Panel[]{
Templates.buildSimpleTargetChooser(project, groups).create()
};
} else {
return new WizardDescriptor.Panel[]{
JavaTemplates.createPackageChooser(project, groups, new EmptyTestStepLocation())
};
}
}
示例4: getDTDPanel
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
private WizardDescriptor.Panel getDTDPanel() {
if (dtdPanel == null) {
dtdPanel = new DTDPanel();
dtdPanel.setObject(model);
String[] steps = new String[3];
steps[0] = getTargetPanelName();
steps[1] = getDocumentPanelName();
steps[2] = getDTDPanelName();
String[] newSteps = createSteps(beforeSteps,steps);
dtdPanel.putClientProperty(
WizardDescriptor.PROP_CONTENT_DATA, // NOI18N
newSteps
);
}
return new AbstractPanel.WizardStep(dtdPanel);
}
示例5: currentComponent
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
private WizardDescriptor.Panel currentComponent() {
switch (current) {
case TARGET_PANEL:
return getTargetPanel();
case DOCUMENT_PANEL:
return getDocumentPanel();
case CONSTRAINT_PANEL:
switch (model.getType()) {
case DocumentModel.DTD:
return getDTDPanel();
case DocumentModel.SCHEMA:
return getSchemaPanel();
default:
throw new IllegalStateException();
}
case CONTENT_PANEL:
return getXMLContentPanel();
default:
throw new IllegalStateException();
}
}
示例6: getPanels
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
private List<WizardDescriptor.Panel<WizardDescriptor>> getPanels() {
if (panels == null) {
Project project = Templates.getProject(wizard);
Sources sources = ProjectUtils.getSources(project);
SourceGroup[] groups = sources.getSourceGroups(JavaProjectConstants.SOURCES_TYPE_JAVA);
panels = new ArrayList<WizardDescriptor.Panel<WizardDescriptor>>();
panels.add(JavaTemplates.createPackageChooser(project, groups));
String[] steps = createSteps();
for (int i = 0; i < panels.size(); i++) {
Component c = panels.get(i).getComponent();
if (steps[i] == null) {
// Default step name to component name of panel. Mainly
// useful for getting the name of the target chooser to
// appear in the list of steps.
steps[i] = c.getName();
}
if (c instanceof JComponent) { // assume Swing components
JComponent jc = (JComponent) c;
jc.putClientProperty(WizardDescriptor.PROP_TITLE, "New primitive");
// Sets highlighted step
jc.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, i);
// Set steps names shown on the left side of the wizard
jc.putClientProperty(WizardDescriptor.PROP_CONTENT_DATA, steps);
// Turn on subtitle creation on each step
jc.putClientProperty(WizardDescriptor.PROP_AUTO_WIZARD_STYLE, true);
// Show steps on the left side with the image on the background
jc.putClientProperty(WizardDescriptor.PROP_CONTENT_DISPLAYED, true);
// Turn on numbering of all steps
jc.putClientProperty(WizardDescriptor.PROP_CONTENT_NUMBERED, true);
}
}
}
return panels;
}
示例7: createPanels
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
@SuppressWarnings({"unchecked", "rawtypes"}) // XXX until rewrite panel storage
private WizardDescriptor.Panel<WizardDescriptor>[] createPanels(ValidationGroup enabledVG, ValidationGroup errorMsgVG) {
return new WizardDescriptor.Panel[] {
ArchetypeWizards.basicWizardPanel(errorMsgVG, false, archetype),
new NbmWizardPanel(enabledVG, errorMsgVG, archetype)
};
}
示例8: getChooser
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
WizardDescriptor.Panel<WizardDescriptor> getChooser(TemplateWizard wizard, String type) {
if (choosers == null) {
choosers = new HashMap<>();
}
WizardDescriptor.Panel<WizardDescriptor> panel = choosers.get(type);
if (panel == null) {
panel = loadPanel(type, wizard);
choosers.put(type, panel);
}
return panel;
}
示例9: current
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
public WizardDescriptor.Panel current() {
return getPanels()[index];
}
示例10: createPanels
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
private WizardDescriptor.Panel[] createPanels() {
return new WizardDescriptor.Panel[]{
new TemplateBotProjectWizardPanel(),};
}
示例11: current
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
@Override
public WizardDescriptor.Panel<WizardDescriptor> current () {
assert panels != null;
return panels.get (index);
}
示例12: current
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
public WizardDescriptor.Panel current() {
return panels[index];
}
示例13: createPackageChooser
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
static WizardDescriptor.Panel<WizardDescriptor> createPackageChooser(Object project, String type) throws Exception {
Project p = (Project) project;
Sources src = ProjectUtils.getSources(p);
SourceGroup[] groups = src.getSourceGroups(type);
return JavaTemplates.createPackageChooser(p, groups);
}
示例14: current
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
@Override
public WizardDescriptor.Panel current() {
return panels[index];
}
示例15: createPanels
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
private WizardDescriptor.Panel[] createPanels(final WizardDescriptor wizardDescriptor) {
return new WizardDescriptor.Panel[]{getTargetPanel()};
}