GladeForrestPlugin/src/java/org/metamorphosis/glade/preferences GladePreferencePage.java,NONE,1.1

Nick Chalko <[email protected]> Mon, 19 Jul 2004 05:43:57 +0000
Newsgroups gmane.comp.krysalis.metamorphosis.cvs
Message-ID <[email protected]>
Update of /cvsroot/metamorphosis/GladeForrestPlugin/src/java/org/metamorphosis/glade/preferences
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28611/src/java/org/metamorphosis/glade/preferences

Added Files:
	GladePreferencePage.java 
Log Message:
Playing with an eclipse plugin for forrest.

--- NEW FILE: GladePreferencePage.java ---
package org.metamorphosis.glade.preferences;

import org.eclipse.jface.preference.*;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.IWorkbench;
import org.metamorphosis.glade.ForrestStarterPlugin;
import org.eclipse.jface.preference.IPreferenceStore;

/**
 * This class represents a preference page that
 * is contributed to the Preferences dialog. By 
 * subclassing <samp>FieldEditorPreferencePage</samp>, we
 * can use the field support built into JFace that allows
 * us to create a page that is small and knows how to 
 * save, restore and apply itself.
 * <p>
 * This page is used to modify preferences only. They
 * are stored in the preference store that belongs to
 * the main plug-in class. That way, preferences can
 * be accessed directly via the preference store.
 */


public class GladePreferencePage
	extends FieldEditorPreferencePage
	implements IWorkbenchPreferencePage {
	public static final String P_PATH = "pathPreference";

	public GladePreferencePage() {
		super(GRID);
		setPreferenceStore(ForrestStarterPlugin.getDefault().getPreferenceStore());
		setDescription("A demonstration of a preference page implementation");
		initializeDefaults();
	}
/**
 * Sets the default values of the preferences.
 */
	private void initializeDefaults() {
		IPreferenceStore store = getPreferenceStore();

	}
	
/**
 * Creates the field editors. Field editors are abstractions of
 * the common GUI blocks needed to manipulate various types
 * of preferences. Each field editor knows how to save and
 * restore itself.
 */

	public void createFieldEditors() {
		addField(new DirectoryFieldEditor(P_PATH, 
				"&Forrest Home:", getFieldEditorParent()));

	}
	
	public void init(IWorkbench workbench) {
	}
}


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click