KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > update > internal > ui > properties > InstallConfigurationPropertyPage


1 /*******************************************************************************
2  * Copyright (c) 2003, 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.update.internal.ui.properties;
12
13 import org.eclipse.swt.*;
14 import org.eclipse.swt.layout.*;
15 import org.eclipse.swt.widgets.*;
16 import org.eclipse.ui.*;
17 import org.eclipse.ui.dialogs.*;
18 import org.eclipse.update.configurator.*;
19 import org.eclipse.update.internal.ui.UpdateUIMessages;
20
21 /**
22  * @see PropertyPage
23  */

24 public class InstallConfigurationPropertyPage extends PropertyPage implements IWorkbenchPropertyPage {
25     /**
26      *
27      */

28     public InstallConfigurationPropertyPage() {
29         noDefaultAndApplyButton();
30     }
31
32     protected Control createContents(Composite parent) {
33         Composite composite = new Composite(parent,SWT.NONE);
34         GridLayout layout = new GridLayout();
35         layout.numColumns = 2;
36         composite.setLayout(layout);
37         addProperty(composite, UpdateUIMessages.ConfiguredSitePropertyPage_path, ConfiguratorUtils.getInstallURL().toString());
38         return composite;
39     }
40     
41
42     private void addProperty(Composite parent, String JavaDoc key, String JavaDoc value) {
43         Label label = new Label(parent, SWT.NULL);
44         label.setText(key);
45         
46         label = new Label(parent, SWT.NULL);
47         label.setText(value);
48         GridData gd = new GridData(GridData.FILL_HORIZONTAL);
49         label.setLayoutData(gd);
50     }
51 }
52
Popular Tags