当前位置: 首页>>代码示例>>Java>>正文


Java WizardDescriptor.ArrayIterator方法代码示例

本文整理汇总了Java中org.openide.WizardDescriptor.ArrayIterator方法的典型用法代码示例。如果您正苦于以下问题:Java WizardDescriptor.ArrayIterator方法的具体用法?Java WizardDescriptor.ArrayIterator怎么用?Java WizardDescriptor.ArrayIterator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.openide.WizardDescriptor的用法示例。


在下文中一共展示了WizardDescriptor.ArrayIterator方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: 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);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:31,代码来源:RunTagWizard.java

示例2: showTestWizard

import org.openide.WizardDescriptor; //导入方法依赖的package包/类
/** Opens test wizard with 3 steps. */
private void showTestWizard() {
    TestPanel panel0 = new TestPanel(0);
    panel0.addPropertyChangeListener(this);
    TestPanel panel1 = new TestPanel(1);
    panel1.addPropertyChangeListener(this);
    TestPanel panel2 = new TestPanel(2);
    panel2.addPropertyChangeListener(this);
    WizardDescriptor.Panel[] panels = {
        panel0,
        panel1,
        panel2
    };
    WizardDescriptor.ArrayIterator iterator = new WizardDescriptor.ArrayIterator(panels);
    wd = new WizardDescriptor(iterator);
    wd.putProperty(PROP_AUTO_WIZARD_STYLE, Boolean.TRUE);
    wd.putProperty(PROP_CONTENT_DISPLAYED, Boolean.TRUE);
    wd.putProperty(PROP_CONTENT_NUMBERED, Boolean.TRUE);
    wd.putProperty(PROP_CONTENT_DATA, new String[]{
                TEST_WIZARD_PANEL0,
                TEST_WIZARD_PANEL1,
                TEST_WIZARD_PANEL2
            });
    wd.setTitle(TEST_WIZARD_TITLE);
    wd.setModal(false);
    dialog = DialogDisplayer.getDefault().createDialog(wd);
    dialog.setSize(600, 400);
    dialog.setVisible(true);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:30,代码来源:WizardOperatorTest.java

示例3: 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);
        
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:I18nTestWizardAction.java

示例4: 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()])
    );
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:16,代码来源:I18nWizardAction.java

示例5: show

import org.openide.WizardDescriptor; //导入方法依赖的package包/类
@NbBundle.Messages("LBL_BuildImage=Build Image")
public void show() {
    List<WizardDescriptor.Panel<WizardDescriptor>> panels = new ArrayList<>();
    if (instance == null) {
        panels.add(new BuildInstancePanel());
    }
    panels.add(new BuildContextPanel(fileSystem));
    panels.add(new BuildOptionsPanel());
    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);
    }

    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_BuildImage());

    if (instance != null) {
        wiz.putProperty(INSTANCE_PROPERTY, instance);
    }
    if (dockerfile != null && dockerfile.isData()) {
        wiz.putProperty(BUILD_CONTEXT_PROPERTY, dockerfile.getParent().getPath());
        wiz.putProperty(DOCKERFILE_PROPERTY, dockerfile.getName());
    }
    wiz.putProperty(FILESYSTEM_PROPERTY, fileSystem);

    if (DialogDisplayer.getDefault().notify(wiz) == WizardDescriptor.FINISH_OPTION) {
        Boolean pull = (Boolean) wiz.getProperty(PULL_PROPERTY);
        Boolean noCache = (Boolean) wiz.getProperty(NO_CACHE_PROPERTY);
        build((DockerInstance) wiz.getProperty(INSTANCE_PROPERTY),
                (String) wiz.getProperty(BUILD_CONTEXT_PROPERTY),
                (String) wiz.getProperty(DOCKERFILE_PROPERTY),
                (Map<String, String>) wiz.getProperty(BUILD_ARGUMENTS_PROPERTY),
                (String) wiz.getProperty(REPOSITORY_PROPERTY),
                (String) wiz.getProperty(TAG_PROPERTY),
                pull != null ? pull : PULL_DEFAULT,
                noCache != null ? noCache : NO_CACHE_DEFAULT);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:48,代码来源:BuildImageWizard.java


注:本文中的org.openide.WizardDescriptor.ArrayIterator方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。