KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > ide > dialogs > WizardStep


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.ui.internal.ide.dialogs;
12
13 import org.eclipse.jface.wizard.IWizard;
14
15 /**
16  * Represents a step in a multi-step wizard.
17  */

18 public abstract class WizardStep {
19     private int number;
20
21     private boolean done = false;
22
23     /**
24      * Creates a wizard step.
25      *
26      * @param number the step number
27      */

28     public WizardStep(int number) {
29         super();
30         this.number = number;
31     }
32
33     /**
34      * Returns the label for this step that can
35      * be presented to the user.
36      *
37      * @return String the label of this step
38      */

39     abstract public String JavaDoc getLabel();
40
41     /**
42      * Returns an explaination of this step that can
43      * be presented to the user.
44      *
45      * @return String the details of this step
46      */

47     abstract public String JavaDoc getDetails();
48
49     /**
50      * Returns the step's number.
51      *
52      * @return int the step's number
53      */

54     public int getNumber() {
55         return number;
56     }
57
58     /**
59      * Returns the step's wizard. Subclasses are
60      * responsible for calling addPages method on
61      * the wizard, if needed, before returning.
62      *
63      * @return IWizard the wizard to complete the step
64      */

65     public abstract IWizard getWizard();
66
67     /**
68      * Returns whether the step is done it's work
69      */

70     public boolean isDone() {
71         return done;
72     }
73
74     /**
75      * Sets the step as being done
76      */

77     public void markAsDone() {
78         done = true;
79     }
80 }
81
Popular Tags