KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > ui > wizards > feature > FeatureSelectionDialog


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

11
12 package org.eclipse.pde.internal.ui.wizards.feature;
13
14 import org.eclipse.pde.internal.core.ifeature.*;
15 import org.eclipse.pde.internal.ui.*;
16 import org.eclipse.swt.widgets.*;
17 import org.eclipse.ui.dialogs.*;
18
19 /**
20  * @author cgwong
21  */

22 public class FeatureSelectionDialog extends ElementListSelectionDialog {
23
24     /**
25      * @param parent
26      * @param renderer
27      */

28     public FeatureSelectionDialog(Shell parent, IFeatureModel[] models) {
29         super(parent, PDEPlugin.getDefault().getLabelProvider());
30         setTitle(PDEPlugin.getResourceString("FeatureSelectionDialog.title")); //$NON-NLS-1$
31
setMessage(PDEPlugin.getResourceString("FeatureSelectionDialog.message")); //$NON-NLS-1$
32
setElements(models);
33         setMultipleSelection(false);
34         PDEPlugin.getDefault().getLabelProvider().connect(this);
35     }
36     
37     public boolean close() {
38         PDEPlugin.getDefault().getLabelProvider().disconnect(this);
39         return super.close();
40     }
41     /* (non-Javadoc)
42      * @see org.eclipse.ui.dialogs.AbstractElementListSelectionDialog#setValidator(org.eclipse.ui.dialogs.ISelectionStatusValidator)
43      */

44     public void setValidator(ISelectionStatusValidator validator) {
45         super.setValidator(validator);
46     }
47 }
48
Popular Tags