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


Java WizardDisplayer类代码示例

本文整理汇总了Java中org.netbeans.api.wizard.WizardDisplayer的典型用法代码示例。如果您正苦于以下问题:Java WizardDisplayer类的具体用法?Java WizardDisplayer怎么用?Java WizardDisplayer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: showGameSetupWizard

import org.netbeans.api.wizard.WizardDisplayer; //导入依赖的package包/类
/**
 * Show a wizard that prompts the user to specify information for unfinished {@link GameSetupStep}s
 */
public void showGameSetupWizard() {
  GameSetupPanels panels = GameSetupPanels.newInstance();
  if (panels != null) {
    WizardDisplayer.showWizard(panels.newWizard(logoSize), new Rectangle(0, 0, logoSize.width + 400, logoSize.height));
  }
}
 
开发者ID:ajmath,项目名称:VASSAL-src,代码行数:10,代码来源:WizardSupport.java

示例2: show

import org.netbeans.api.wizard.WizardDisplayer; //导入依赖的package包/类
public static void show() {
    if (parent != null) {
        parent.toFront();
        return;
    }
    
    parent = new JFrame();
    parent.setTitle("Verteidigungsplaner");
    WizardPanelProvider provider = new DefensePlanerWizard();
    Wizard wizard = provider.createWizard();
    parent.getContentPane().setLayout(new BorderLayout());
    WizardDisplayer.installInContainer(parent, BorderLayout.CENTER, wizard, null, null, new WizardResultReceiver() {

        @Override
        public void finished(Object o) {
            parent.dispose();
            parent = null;
        }

        @Override
        public void cancelled(Map map) {
            parent.dispose();
            parent = null;
        }
    });
    parent.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    parent.addWindowListener(new WindowAdapter() {

        @Override
        public void windowClosing(WindowEvent e) {
            super.windowClosing(e);
            parent = null;
        }
    });
    parent.pack();
    parent.setVisible(true);
    new SOSGenerator().setVisible(true);
}
 
开发者ID:Torridity,项目名称:dsworkbench,代码行数:39,代码来源:DefensePlanerWizard.java

示例3: getFactoryViaLookup

import org.netbeans.api.wizard.WizardDisplayer; //导入依赖的package包/类
public static WizardDisplayer getFactoryViaLookup() {
    return null;
}
 
开发者ID:ajmath,项目名称:VASSAL-src,代码行数:4,代码来源:NbBridge.java

示例4: showWelcomeWizard

import org.netbeans.api.wizard.WizardDisplayer; //导入依赖的package包/类
/**
 * Show the "Welcome" wizard, shown when loading a module in play mode
 *
 */
public void showWelcomeWizard() {

  final GameModule g = GameModule.getGameModule();
  final Boolean showWizard = (Boolean) Prefs.getGlobalPrefs().getValue(WELCOME_WIZARD_KEY);

  if (! Boolean.TRUE.equals(showWizard)) {
    g.getFrame().setVisible(true);

    // prompt for username and password if wizard is off
    // but no username is set
    // FIXME: this belongs outside of the wizard, not here
    final String name = (String) g.getPrefs().getValue(GameModule.REAL_NAME);
    if (name == null || name.equals("newbie")) {
      new UsernameAndPasswordDialog(g.getFrame()).setVisible(true);
    }

    return;
  }

  final WizardBranchController c = createWelcomeWizard();
  final Wizard welcomeWizard = c.createWizard();
  final HashMap<String, Wizard> props = new HashMap<String, Wizard>();
  props.put(WELCOME_WIZARD_KEY, welcomeWizard);

  Action help = null;
  try {
    help = new ShowHelpAction(new URL("http://www.vassalengine.org/wiki/doku.php?id=getting_started:getting_started"), null);
  }
  catch (MalformedURLException e) {
    ErrorDialog.bug(e);
  }

  final Object result =
    WizardDisplayer.showWizard(welcomeWizard, null, help, props);

  if (result instanceof Map) {
    final Map m = (Map) result;
    final Object action = m.get(ACTION_KEY);
    if (PLAY_ONLINE_ACTION.equals(action)) {
      final ChatServerControls controls =
        ((BasicModule) g).getServerControls();
      g.getFrame().setVisible(true);
      controls.toggleVisible();

      new SwingWorker<Void,Void>() {
        @Override
        protected Void doInBackground() {
          controls.getClient().setConnected(true);
          return null;
        }
      }.execute();
    }
    else {
      g.getGameState().setup(true);
      g.getFrame().setVisible(true);
    }
  }
  else {
    g.getFrame().setVisible(true);
  }
}
 
开发者ID:ajmath,项目名称:VASSAL-src,代码行数:66,代码来源:WizardSupport.java

示例5: show

import org.netbeans.api.wizard.WizardDisplayer; //导入依赖的package包/类
public static void show() {
    if (parent != null) {
        parent.toFront();
        return;
    }
    parent = new JFrame();
    parent.setTitle("Taktikplaner");
    Wizard wizard = new TacticsPlanerBranchController().createWizard();
    parent.getContentPane().setLayout(new BorderLayout());
    System.setProperty("WizardDisplayer.default", "de.tor.tribes.ui.wiz.AttackWizardDisplayerImpl");
    WizardDisplayer.installInContainer(parent, BorderLayout.CENTER, wizard, null, null, new WizardResultReceiver() {

        @Override
        public void finished(Object o) {
            parent.dispose();
            parent = null;
        }

        @Override
        public void cancelled(Map map) {
            parent.dispose();
            parent = null;
        }
    });
    //restore property
    System.setProperty("WizardDisplayer.default", "org.netbeans.api.wizard.displayer.WizardDisplayerImpl");
    TAPAttackInfoPanel.getSingleton().setVisible(false);
    parent.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    parent.addWindowListener(new WindowAdapter() {

        @Override
        public void windowClosing(WindowEvent e) {
            try {
                GlobalOptions.addProperty("tap.width", Integer.toString(parent.getWidth()));
                GlobalOptions.addProperty("tap.height", Integer.toString(parent.getHeight()));
            } catch (Exception ignored) {
            }
            super.windowClosing(e);
            parent = null;
        }
    });
    parent.pack();

    int w = GlobalOptions.getProperties().getInt("tap.width");
    int h = GlobalOptions.getProperties().getInt("tap.height");

    if (w != 0 && h != 0) {
        parent.setSize(w, h);
    }

    // <editor-fold defaultstate="collapsed" desc=" Init HelpSystem ">
    if (!Constants.DEBUG) {
        GlobalOptions.getHelpBroker().enableHelpKey(parent.getRootPane(), "pages.attack_planer", GlobalOptions.getHelpBroker().getHelpSet());
    }       // </editor-fold>

    parent.setVisible(true);
}
 
开发者ID:Torridity,项目名称:dsworkbench,代码行数:58,代码来源:TacticsPlanerWizard.java

示例6: show

import org.netbeans.api.wizard.WizardDisplayer; //导入依赖的package包/类
public static void show() {
    if (parent != null) {
        parent.toFront();
        return;
    }
    parent = new JFrame();

    parent.setTitle("Rohstoffverteiler");
    Wizard wizard = new ResourceDistributorBranchController().createWizard();
    parent.getContentPane().setLayout(new BorderLayout());
    WizardDisplayer.installInContainer(parent, BorderLayout.CENTER, wizard, null, null, new WizardResultReceiver() {

        @Override
        public void finished(Object o) {
            parent.dispose();
            parent = null;
        }

        @Override
        public void cancelled(Map map) {
            parent.dispose();
            parent = null;
        }
    });
    parent.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    parent.addWindowListener(new WindowAdapter() {

        @Override
        public void windowClosing(WindowEvent e) {
            try {
                GlobalOptions.addProperty("red.width", Integer.toString(parent.getWidth()));
                GlobalOptions.addProperty("red.height", Integer.toString(parent.getHeight()));
            } catch (Exception ignored) {
            }
            super.windowClosing(e);
            parent = null;
        }
    });
    parent.pack();
    int w = GlobalOptions.getProperties().getInt("red.width");
    int h = GlobalOptions.getProperties().getInt("red.height");
    if (w != 0 && h != 0) {
        parent.setSize(w, h);
    }

    // <editor-fold defaultstate="collapsed" desc=" Init HelpSystem ">
    if (!Constants.DEBUG) {
        GlobalOptions.getHelpBroker().enableHelpKey(parent.getRootPane(), "pages.merchant_distributor", GlobalOptions.getHelpBroker().getHelpSet());
    }       // </editor-fold>

    parent.setVisible(true);
}
 
开发者ID:Torridity,项目名称:dsworkbench,代码行数:53,代码来源:ResourceDistributorWizard.java


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