KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > ui > wizards > NewWizard


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 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.pde.internal.ui.wizards;
12 import java.util.Dictionary JavaDoc;
13
14 import org.eclipse.jface.viewers.IStructuredSelection;
15 import org.eclipse.jface.wizard.Wizard;
16 import org.eclipse.pde.internal.ui.PDEUIMessages;
17 import org.eclipse.ui.INewWizard;
18 import org.eclipse.ui.IWorkbench;
19
20 public class NewWizard extends Wizard implements INewWizard, IDefaultValueConsumer {
21     private org.eclipse.ui.IWorkbench workbench;
22     private org.eclipse.jface.viewers.IStructuredSelection selection;
23     private Dictionary JavaDoc defaultValues;
24     
25     public NewWizard() {
26         super();
27         setWindowTitle(PDEUIMessages.NewWizard_wtitle);
28     }
29     public org.eclipse.jface.viewers.IStructuredSelection getSelection() {
30         return selection;
31     }
32     public IWorkbench getWorkbench() {
33         return workbench;
34     }
35     public void init(IWorkbench workbench, IStructuredSelection selection) {
36         this.workbench = workbench;
37         this.selection = selection;
38     }
39     public boolean performFinish() {
40         return true;
41     }
42     /*
43      * (non-Javadoc)
44      *
45      * @see org.eclipse.pde.internal.ui.wizards.IDefaultValueConsumer#getDefaultValue(java.lang.String)
46      */

47     public String JavaDoc getDefaultValue(String JavaDoc key) {
48         if (defaultValues==null) return null;
49         return (String JavaDoc)defaultValues.get(key);
50     }
51     /*
52      * (non-Javadoc)
53      *
54      * @see org.eclipse.pde.internal.ui.wizards.IDefaultValueConsumer#init(java.util.Dictionary)
55      */

56     public void init(Dictionary JavaDoc defaultValues) {
57         this.defaultValues = defaultValues;
58     }
59 }
60
Popular Tags