2 * Copyright 2000-2009 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package com
.intellij
.cvsSupport2
.ui
.experts
;
18 import com
.intellij
.ide
.wizard
.AbstractWizard
;
19 import com
.intellij
.openapi
.project
.Project
;
26 public class CvsWizard
extends AbstractWizard
<WizardStep
> {
27 protected CvsWizard(String title
, Project project
) {
28 super(title
, project
);
31 protected void init() {
33 SwingUtilities
.invokeLater(new Runnable() {
40 protected String
getHelpID() {
45 protected void doNextAction() {
46 if ((myCurrentStep
+ 1) >= mySteps
.size()) return;
47 final WizardStep nextStep
= mySteps
.get(myCurrentStep
+ 1);
48 if (! nextStep
.preNextCheck()) {
55 public void updateStep() {
57 if (getNumberOfSteps() == 0) return;
58 WizardStep currentStep
= getCurrentStepObject();
59 if (!currentStep
.setActive()){
63 currentStep
.getPreferredFocusedComponent().requestFocus();
64 if (!currentStep
.nextIsEnabled()) {
65 getNextButton().setEnabled(false);
66 getFinishButton().setEnabled(false);
69 getFinishButton().setEnabled((getCurrentStep() + 1) == getNumberOfSteps());
74 public void disableNextAndFinish() {
75 if (getNextButton().isEnabled() || getFinishButton().isEnabled()) {
80 public void enableNextAndFinish() {
81 if ((!getNextButton().isEnabled()) || (!getFinishButton().isEnabled())) {
86 protected void doOKAction() {
87 for (final WizardStep step
: mySteps
) {
93 public void dispose() {
95 for (final WizardStep step
: mySteps
) {
104 public void goToPrevious() {