home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2003 March / DPPCPRO0303.ISO / Components / Microsoft ASP / _SETUP.1 / ASPWizard.jar / asp / wizard / WizardViewIntro.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-11-20  |  1.9 KB  |  51 lines

  1. package asp.wizard;
  2.  
  3. import com.sun.java.swing.ButtonModel;
  4.  
  5. public class WizardViewIntro extends WizardViewAbstract {
  6.    private static WizardViewAbstract _instance = null;
  7.    private WVPanelIntro _mainPanel;
  8.  
  9.    public static WizardViewAbstract getInstance() {
  10.       if (_instance == null) {
  11.          _instance = new WizardViewIntro();
  12.       }
  13.  
  14.       return _instance;
  15.    }
  16.  
  17.    protected void createMainPanel() {
  18.       this._mainPanel = new WVPanelIntro();
  19.    }
  20.  
  21.    public int getSeqTemplateId() {
  22.       int result = -1;
  23.       ButtonModel buttonModel = this._mainPanel._btgTemplates.getSelection();
  24.       if (buttonModel != null) {
  25.          String actionCommand = buttonModel.getActionCommand();
  26.          if (actionCommand.equals("radiobutton.list")) {
  27.             result = 0;
  28.          } else if (actionCommand.equals("radiobutton.detail")) {
  29.             result = 1;
  30.          }
  31.       }
  32.  
  33.       return result;
  34.    }
  35.  
  36.    public void setSeqTemplateId(int seqTemplateId) {
  37.       switch (seqTemplateId) {
  38.          case 0:
  39.             this._mainPanel._btgTemplates.setSelected(this._mainPanel._rdbList.getModel(), true);
  40.             break;
  41.          case 1:
  42.             this._mainPanel._btgTemplates.setSelected(this._mainPanel._rdbDetail.getModel(), true);
  43.       }
  44.  
  45.    }
  46.  
  47.    public WVPanelBase getMainPanel() {
  48.       return this._mainPanel;
  49.    }
  50. }
  51.