home *** CD-ROM | disk | FTP | other *** search
- package asp.wizard;
-
- import asp.netobjects.nfx.wizard.WizardPage;
- import asp.netobjects.nfx.wizard.WizardPageView;
- import com.sun.java.swing.BorderFactory;
- import com.sun.java.swing.JComponent;
- import com.sun.java.swing.JLabel;
- import com.sun.java.swing.JPanel;
- import java.awt.BorderLayout;
- import java.awt.Container;
-
- public class WizardViewAbstract extends WizardPageView {
- public WizardViewAbstract() {
- if (((WizardPageView)this).getContentPanel() != null) {
- JPanel contentPanel = ((WizardPageView)this).getContentPanel();
- ((JComponent)contentPanel).setBorder(BorderFactory.createEmptyBorder());
- }
-
- JPanel p = ((WizardPageView)this).getContentPanel();
- ((Container)p).setLayout(new BorderLayout());
- ((Container)p).add(new JLabel(this.getClass().getName()), "Center");
- this.createMainPanel();
- this.setupMainPanel();
- }
-
- public WizardViewAbstract(WizardPage page) {
- super(page);
- JPanel p = null;
- p = ((WizardPageView)this).getContentPanel();
- ((Container)p).setLayout(new BorderLayout());
- ((Container)p).add(new JLabel(this.getClass().getName()), "Center");
- this.createMainPanel();
- this.setupMainPanel();
- }
-
- protected void createMainPanel() {
- }
-
- protected void setupMainPanel() {
- if (this.getMainPanel() != null) {
- JPanel p = ((WizardPageView)this).getContentPanel();
- ((Container)p).setLayout(new BorderLayout());
- ((Container)p).add(this.getMainPanel(), "Center");
- }
-
- }
-
- public boolean isValid() {
- return true;
- }
-
- public WVPanelBase getMainPanel() {
- return null;
- }
-
- public void updateView(WizardModelAbstract model, Object arg) {
- }
-
- public void setModel(WizardPage model) {
- super.setModel(model);
- ((WizardModelAbstract)((WizardPageView)this).getModel()).loadView();
- }
-
- public void setIntroText(String heading, String body, boolean useDefault) {
- if (this.getMainPanel() != null) {
- if (useDefault) {
- this.getMainPanel().initIntroText();
- } else {
- this.getMainPanel().setIntroText(heading, body);
- }
- }
-
- }
-
- public void commit() {
- }
- }
-