KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > team > internal > ui > synchronize > StartupPreferencePage


1 /*******************************************************************************
2  * Copyright (c) 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.team.internal.ui.synchronize;
12
13 import org.eclipse.jface.preference.*;
14 import org.eclipse.team.internal.ui.TeamUIMessages;
15 import org.eclipse.ui.IWorkbench;
16 import org.eclipse.ui.IWorkbenchPreferencePage;
17
18 public class StartupPreferencePage extends FieldEditorPreferencePage implements
19         IWorkbenchPreferencePage {
20
21     public static final String JavaDoc PROP_STARTUP_ACTION = "startupAction"; //$NON-NLS-1$
22
public static final String JavaDoc STARTUP_ACTION_NONE = "none"; //$NON-NLS-1$
23
public static final String JavaDoc STARTUP_ACTION_POPULATE = "populate"; //$NON-NLS-1$
24
public static final String JavaDoc STARTUP_ACTION_SYNCHRONIZE = "synchronize"; //$NON-NLS-1$
25

26     // Property used to make preferences available in the page configuration
27
public static final String JavaDoc STARTUP_PREFERENCES = "org.eclipse.team.ui.startupPreferences"; //$NON-NLS-1$
28

29     public StartupPreferencePage(IPreferenceStore store) {
30         super(GRID);
31         setTitle(TeamUIMessages.StartupPreferencePage_0);
32         setDescription(TeamUIMessages.StartupPreferencePage_1);
33         setPreferenceStore(store);
34     }
35
36     public void init(IWorkbench workbench) {
37         // Nothing to do
38
}
39
40     protected void createFieldEditors() {
41         addField(new RadioGroupFieldEditor(PROP_STARTUP_ACTION,
42                 TeamUIMessages.StartupPreferencePage_2, 1,
43                 new String JavaDoc[][] {
44                     {TeamUIMessages.StartupPreferencePage_3, STARTUP_ACTION_POPULATE},
45                     {TeamUIMessages.StartupPreferencePage_4, STARTUP_ACTION_SYNCHRONIZE},
46                     {TeamUIMessages.StartupPreferencePage_5, STARTUP_ACTION_NONE}
47                 },
48                 getFieldEditorParent(), true /* use a group */));
49     }
50
51 }
52
Popular Tags