BrightSide Workbench Full Report + Source Code
WizardPanelOld.java
Go to the documentation of this file.
1 /*
2  * TurrĂ³ i Cutiller Foundation. License notice.
3  * Copyright (C) 2011 Lluis TurrĂ³ Cutiller <http://www.turro.org/>
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Affero General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Affero General Public License for more details.
14  *
15  * You should have received a copy of the GNU Affero General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 package org.turro.zkoss.wizard;
19 
20 import org.zkoss.zul.Panel;
21 
26 public class WizardPanelOld extends Panel {
27 
28  private String label;
29  private WizardOld wizard;
30  private boolean allowFinish, allowNext, allowPrior, allowCancel, shouldSkip;
31 
32  public WizardPanelOld(String label) {
33  this.label = label;
34  setHflex("1");
35  setVflex("1");
36  }
37 
38  public boolean doEnter() {
39  return true;
40  }
41 
42  public boolean doLeave() {
43  return true;
44  }
45 
46  public String getLabel() {
47  return label;
48  }
49 
50  public void setWizard(WizardOld wizard) {
51  this.wizard = wizard;
52  }
53 
54  public boolean isAllowCancel() {
55  return allowCancel;
56  }
57 
58  public void setAllowCancel(boolean allowCancel) {
59  this.allowCancel = allowCancel;
60  updateWizard();
61  }
62 
63  public boolean isAllowFinish() {
64  return allowFinish;
65  }
66 
67  public void setAllowFinish(boolean allowFinish) {
68  this.allowFinish = allowFinish;
69  updateWizard();
70  }
71 
72  public boolean isAllowNext() {
73  return allowNext;
74  }
75 
76  public void setAllowNext(boolean allowNext) {
77  this.allowNext = allowNext;
78  updateWizard();
79  }
80 
81  public boolean isAllowPrior() {
82  return allowPrior;
83  }
84 
85  public void setAllowPrior(boolean allowPrior) {
86  this.allowPrior = allowPrior;
87  updateWizard();
88  }
89 
90  public boolean isShouldSkip() {
91  return shouldSkip;
92  }
93 
94  public void setShouldSkip(boolean shouldSkip) {
95  this.shouldSkip = shouldSkip;
96  }
97 
98  protected void updateWizard() {
99  wizard.setPriorStatus(isAllowPrior());
100  wizard.setNextStatus(isAllowNext());
101  wizard.setFinishStatus(isAllowFinish());
102  wizard.setCancelStatus(isAllowCancel());
103  }
104 
105 }
void setNextStatus(boolean enabled)
Definition: WizardOld.java:123
void setCancelStatus(boolean enabled)
Definition: WizardOld.java:131
void setFinishStatus(boolean enabled)
Definition: WizardOld.java:127
void setPriorStatus(boolean enabled)
Definition: WizardOld.java:119
void setAllowPrior(boolean allowPrior)
void setAllowCancel(boolean allowCancel)
void setAllowFinish(boolean allowFinish)
void setShouldSkip(boolean shouldSkip)
void setAllowNext(boolean allowNext)