01: /**
02: * Wizard Framework
03: * Copyright (C) 2004 Andrew Pietsch
04: *
05: * This library is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU Lesser General Public
07: * License as published by the Free Software Foundation; either
08: * version 2.1 of the License, or (at your option) any later version.
09: *
10: * This library 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 GNU
13: * Lesser General Public License for more details.
14: *
15: * You should have received a copy of the GNU Lesser General Public
16: * License along with this library; if not, write to the Free Software
17: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18: *
19: * $Id: EmptyStep.java,v 1.5 2005/05/22 07:13:31 pietschy Exp $
20: */package wizard;
21:
22: import org.pietschy.wizard.AbstractWizardStep;
23: import org.pietschy.wizard.InvalidStateException;
24: import org.pietschy.wizard.WizardModel;
25: import org.pietschy.wizard.PanelWizardStep;
26: import org.pietschy.wizard.models.DynamicModel;
27:
28: import javax.swing.*;
29: import java.awt.event.ItemListener;
30: import java.awt.event.ItemEvent;
31: import java.awt.*;
32:
33: /**
34: * Created by IntelliJ IDEA.
35: * User: andrewp
36: * Date: 10/06/2004
37: * Time: 10:59:17
38: * To change this template use Options | File Templates.
39: */
40: public class EmptyStep extends PanelWizardStep {
41:
42: public EmptyStep(String name, String summary) {
43: this (name, summary, null);
44: }
45:
46: public EmptyStep(String name, String summary, Icon icon) {
47: super (name, summary, icon);
48: JToggleButton b = new JToggleButton("Haha: " + name);
49: b.addItemListener(new ItemListener() {
50: public void itemStateChanged(ItemEvent e) {
51: setComplete(e.getStateChange() == ItemEvent.SELECTED);
52: }
53: });
54: setComplete(true);
55: }
56:
57: /////////////////////////////////////////////////////////////////////
58: // Abstract Methods
59: //
60:
61: public void init(WizardModel model) {
62:
63: }
64:
65: public void prepare() {
66: }
67:
68: public void applyState() throws InvalidStateException {
69: }
70: }
|