01: /*
02: * $Id: org.eclipse.jdt.ui.prefs 5004 2006-03-17 20:47:08 -0800 (Fri, 17 Mar
03: * 2006) eelco12 $ $Revision: 5004 $ $Date: 2006-03-17 20:47:08 -0800 (Fri, 17
04: * Mar 2006) $
05: *
06: * ==============================================================================
07: * Licensed under the Apache License, Version 2.0 (the "License"); you may not
08: * use this file except in compliance with the License. You may obtain a copy of
09: * the License at
10: *
11: * http://www.apache.org/licenses/LICENSE-2.0
12: *
13: * Unless required by applicable law or agreed to in writing, software
14: * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15: * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16: * License for the specific language governing permissions and limitations under
17: * the License.
18: */
19: package wicket.extensions.wizard;
20:
21: import wicket.markup.html.panel.Panel;
22:
23: /**
24: * The default bar of button components for wizards. This should be good for 90%
25: * of the cases. If not, override {@link Wizard#newButtonBar(String)} and
26: * provide your own.
27: * <p>
28: * The button bar holds the {@link PreviousButton previous}, [@link NextButton
29: * next}, {@link LastButton last}, [@link CancelButton cancel} and
30: * {@link FinishButton finish} buttons. The {@link LastButton last button} is
31: * off by default. You can turn it on by having the wizard model return true for
32: * {@link IWizardModel#isLastVisible() the is last visble method}.
33: * </p>
34: *
35: * @author Eelco Hillenius
36: */
37: public class WizardButtonBar extends Panel {
38: private static final long serialVersionUID = 1L;
39:
40: /**
41: * Construct.
42: *
43: * @param id
44: * The component id
45: * @param wizard
46: * The containing wizard
47: */
48: public WizardButtonBar(String id, Wizard wizard) {
49: super (id);
50: add(new PreviousButton("previous", wizard));
51: add(new NextButton("next", wizard));
52: add(new LastButton("last", wizard));
53: add(new CancelButton("cancel", wizard));
54: add(new FinishButton("finish", wizard));
55: }
56: }
|