2 * Copyright (c) 2003 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
9 * IBM - Initial API and implementation
11 package org.eclipse.webbrowser.internal;
13 import org.eclipse.swt.*;
14 import org.eclipse.swt.layout.*;
15 import org.eclipse.swt.widgets.*;
16 import org.eclipse.jface.dialogs.Dialog;
17 import org.eclipse.jface.preference.PreferencePage;
18 import org.eclipse.ui.IWorkbench;
19 import org.eclipse.ui.IWorkbenchPreferencePage;
20 import org.eclipse.ui.help.WorkbenchHelp;
22 * A preference page that holds internet preferences.
24 public class InternetPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
26 * InternetPreferencePage constructor comment.
28 public InternetPreferencePage() {
30 noDefaultAndApplyButton();
34 * Create the preference options.
36 * @param parent org.eclipse.swt.widgets.Composite
37 * @return org.eclipse.swt.widgets.Control
39 protected Control createContents(Composite parent) {
40 initializeDialogUnits(parent);
42 Composite composite = new Composite(parent, SWT.NONE);
43 GridLayout layout = new GridLayout();
44 layout.numColumns = 1;
45 layout.horizontalSpacing = convertHorizontalDLUsToPixels(4);
46 layout.verticalSpacing = convertVerticalDLUsToPixels(4);
47 layout.marginWidth = 0;
48 layout.marginHeight = 0;
49 composite.setLayout(layout);
50 GridData data = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL);
51 composite.setLayoutData(data);
52 WorkbenchHelp.setHelp(composite, ContextIds.PREF_BROWSER);
54 Label label = new Label(composite, SWT.WRAP);
55 label.setText(WebBrowserUIPlugin.getResource("%preferenceInternetDescription"));
56 data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
57 label.setLayoutData(data);
59 Dialog.applyDialogFont(composite);
65 * Initializes this preference page using the passed desktop.
67 * @param desktop the current desktop
69 public void init(IWorkbench workbench) { }