01: /**
02: * Created on Dec 2, 2004
03: *
04: * @author karthikeyanr
05: *
06: */package test.wizard.ui;
07:
08: import java.awt.*;
09: import java.util.*;
10: import java.util.List;
11:
12: import wizard.ui.AbstractWizard;
13:
14: public class MockWizard extends AbstractWizard {
15: private boolean isComplete;
16:
17: public MockWizard(Frame owner, String title)
18: throws HeadlessException {
19: super (owner, title);
20: isComplete = true;
21: initComponents();
22: }
23:
24: private void initComponents() {
25: List cardList = new Vector();
26: cardList.add(new MockPanel("First", true));
27: cardList.add(new MockPanel("Second", false));
28: cardList.add(new MockPanel("Third", true));
29: addCards(cardList);
30: }
31:
32: public void setShouldSucceed(boolean isComplete) {
33: this .isComplete = isComplete;
34: }
35:
36: public boolean wizardComplete() {
37: return isComplete;
38: }
39: }
|