KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > ide > dialogs > IDEWorkbenchPreferencePage


1 /*******************************************************************************
2  * Copyright (c) 2000, 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.ui.internal.ide.dialogs;
12
13 import org.eclipse.jface.preference.IPreferenceStore;
14 import org.eclipse.swt.widgets.Composite;
15 import org.eclipse.swt.widgets.Control;
16 import org.eclipse.ui.IWorkbenchPreferencePage;
17 import org.eclipse.ui.PlatformUI;
18 import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
19 import org.eclipse.ui.internal.dialogs.WorkbenchPreferencePage;
20 import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
21
22 /**
23  * The IDE workbench main preference page.
24  *
25  *Note: want IDE settings to appear in main Workbench preference page (via subclassing),
26  * however the superclass, WorkbenchPreferencePage, is internal
27  */

28 public class IDEWorkbenchPreferencePage extends WorkbenchPreferencePage
29         implements IWorkbenchPreferencePage {
30
31     /*
32      * (non-Javadoc)
33      *
34      * @see org.eclipse.jface.preference.PreferencePage
35      */

36     protected Control createContents(Composite parent) {
37
38         PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
39                 IWorkbenchHelpContextIds.WORKBENCH_PREFERENCE_PAGE);
40
41         Composite composite = createComposite(parent);
42
43         createShowUserDialogPref(composite);
44         createStickyCyclePref(composite);
45         createHeapStatusPref(composite);
46         
47         createOpenModeGroup(composite);
48
49         applyDialogFont(composite);
50
51         return composite;
52     }
53
54      /**
55      * Returns the IDE preference store.
56      * @return the preference store.
57      */

58     protected IPreferenceStore getIDEPreferenceStore() {
59         return IDEWorkbenchPlugin.getDefault().getPreferenceStore();
60     }
61
62     /**
63      * The default button has been pressed.
64      */

65     protected void performDefaults() {
66         super.performDefaults();
67     }
68
69     /**
70      * The user has pressed Ok. Store/apply this page's values appropriately.
71      */

72     public boolean performOk() {
73         return super.performOk();
74     }
75    
76 }
77
Popular Tags