diff options
Diffstat (limited to 'jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/ui/preferences')
4 files changed, 0 insertions, 270 deletions
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/ui/preferences/PDPreferencePage.java b/jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/ui/preferences/PDPreferencePage.java deleted file mode 100644 index 1be27be38..000000000 --- a/jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/ui/preferences/PDPreferencePage.java +++ /dev/null @@ -1,153 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2006 Sybase, Inc. and others. - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Sybase, Inc. - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.pagedesigner.ui.preferences; - -import org.eclipse.jface.preference.BooleanFieldEditor; -import org.eclipse.jface.preference.FieldEditorPreferencePage; -import org.eclipse.jface.preference.IntegerFieldEditor; -import org.eclipse.jst.pagedesigner.PDPlugin; -import org.eclipse.jst.pagedesigner.utils.EditorUtil; -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Group; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.IWorkbenchPreferencePage; - -/** - * 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. - * - * C.B: Copied from the GEMPreferences in the Faces Config Editor. - */ - -public final class PDPreferencePage extends FieldEditorPreferencePage implements - IWorkbenchPreferencePage -{ - - // appearance - - private Group _cssLayoutGroup; - - // private BooleanField _enableAbsolute; - // - // private IntegerFieldEditor _artificialCellpadding; - - private class BooleanField extends BooleanFieldEditor - { - // private Composite parent; - - /** - * @param name - * @param label - * @param parent - */ - public BooleanField(String name, String label, Composite parent) - { - super(name, label, parent); - // this.parent = parent; - } - - // /** - // * @return the change control button - // */ - // public Button getButton() { - // return getChangeControl(parent); - // } - } - - /** - * Constructor - */ - public PDPreferencePage() - { - super(GRID); - setPreferenceStore(PDPlugin.getDefault().getPreferenceStore()); - setDescription(PreferenceMessages.PDPreferences_description); - } - - /** - * 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() - { - _cssLayoutGroup = new Group(getFieldEditorParent(), SWT.NULL); - - // note, we aren't saving the reference. It's assumed that parent - // worries about destruction, persistence etc. - /* _enableAbsolute = */addBooleanField( - PDPreferences.CSS_ENABLE_ABSOLUTE_POSITIONING, - PreferenceMessages.EditorPreferences_LABEL_CSSEnableAbsolutePositioning, - _cssLayoutGroup); - /* _artificialCellpadding = */addIntegerField( - PDPreferences.CSS_USE_ARTIFICAL_CELL_PADDING, - PreferenceMessages.EditorPreferences_LABEL_CSSArtificalCellPadding, - _cssLayoutGroup); - } - - - @Override - public boolean performOk() - { - final boolean succeeded = super.performOk(); - if (succeeded) - { - EditorUtil.refreshAllWPEDesignViewers(); - } - return succeeded; - } - - - protected void initialize() - { - // Color use: Default canvas colors should pick up system defaults - // enable or disable all of the color and font selection controls in the - // preference dialog - // depending on whether the "Use System Colors" checkbox is selected. - super.initialize(); - - ((GridLayout) getFieldEditorParent().getLayout()).numColumns = 1; - _cssLayoutGroup.setLayout(new GridLayout(2, false)); - _cssLayoutGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL - | GridData.VERTICAL_ALIGN_BEGINNING)); - } - - public void init(IWorkbench workbench) - { - // no initialization - } - - private IntegerFieldEditor addIntegerField(String name, String labelText, - Composite parent) - { - IntegerFieldEditor f = new IntegerFieldEditor(name, labelText, parent); - addField(f); - return f; - } - - private BooleanField addBooleanField(String name, String labelText, - Composite parent) - { - BooleanField f = new BooleanField(name, labelText, parent); - addField(f); - return f; - } -}
\ No newline at end of file diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/ui/preferences/PDPreferences.java b/jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/ui/preferences/PDPreferences.java deleted file mode 100644 index b2dda7a85..000000000 --- a/jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/ui/preferences/PDPreferences.java +++ /dev/null @@ -1,85 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.jst.pagedesigner.ui.preferences; - -import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jst.pagedesigner.PDPlugin; -import org.eclipse.jst.pagedesigner.editors.HTMLEditor; - -/** - * Utility class for handling preferences related to the Web Page Editor plug-in. - * <br> - * <p><b>Provisional API - subject to change</b></p> - */ -public class PDPreferences extends AbstractPreferenceInitializer { - - /** - * Preference used to set modes for the page designer when displayed in a - * sash editor. - */ - public static final String SASH_EDITOR_MODE_PREF = PDPreferences.class - .getName() - + ".sash_editor_mode"; //$NON-NLS-1$ - /** - * The number of pixels of artificial cell padding to use Default = 0 - */ - public final static String CSS_USE_ARTIFICAL_CELL_PADDING = PDPreferences.class - .getName() - + ".CSSArtificalCellPadding"; //$NON-NLS-1$ - /** - * Whether or not to enable absolute positioning Default = false - */ - public final static String CSS_ENABLE_ABSOLUTE_POSITIONING = PDPreferences.class - .getName() - + ".CSSEnableAbsolutePositioning"; //$NON-NLS-1$ - /** - * The default value for absolute positioning enablement - */ - public static final boolean DEFAULT_CSS_ENABLE_ABSOLUTE_POSITIONING = false; - /** - * The default value for artificial cell padding. - */ - public static final int DEFAULT_CSS_USE_ARTIFICIAL_CELL_PADDING = 4; - - private static IPreferenceStore getPreferenceStore() - { - return PDPlugin.getDefault().getPreferenceStore(); - } - - /** - * @return the css absolute positioning enablement flag. - */ - public boolean isCssAbsolutePositioningEnabled() - { - final IPreferenceStore store = getPreferenceStore(); - return store.getBoolean(CSS_ENABLE_ABSOLUTE_POSITIONING); - } - - /** - * @return the css artificial cell padding preference - */ - public int getCssArtificialCellPadding() - { - final IPreferenceStore store = getPreferenceStore(); - return store.getInt(CSS_USE_ARTIFICAL_CELL_PADDING); - } - - @Override - public void initializeDefaultPreferences() - { - // Set default HTML editor split vertical (i.e. with top and bottom - // pane) - IPreferenceStore store = getPreferenceStore(); - store.setDefault(SASH_EDITOR_MODE_PREF, HTMLEditor.MODE_SASH_VERTICAL); - store.setDefault(CSS_USE_ARTIFICAL_CELL_PADDING, - DEFAULT_CSS_USE_ARTIFICIAL_CELL_PADDING); - store.setDefault(CSS_ENABLE_ABSOLUTE_POSITIONING, - DEFAULT_CSS_ENABLE_ABSOLUTE_POSITIONING); - } -}
\ No newline at end of file diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/ui/preferences/PreferenceMessages.java b/jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/ui/preferences/PreferenceMessages.java deleted file mode 100644 index 0caaeeecb..000000000 --- a/jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/ui/preferences/PreferenceMessages.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.eclipse.jst.pagedesigner.ui.preferences; - -import org.eclipse.osgi.util.NLS; - -/*package*/ class PreferenceMessages extends NLS -{ - private static final String BUNDLE_NAME = "org.eclipse.jst.pagedesigner.ui.preferences.PreferenceMessages"; //$NON-NLS-1$ - /** - * See PreferenceMessages.properties - */ - public static String PDPreferences_description; - /** - * See PreferenceMessages.properties - */ - public static String EditorPreferences_LABEL_CSSArtificalCellPadding; - /** - * See PreferenceMessages.properties - */ - public static String EditorPreferences_LABEL_CSSEnableAbsolutePositioning; - - private PreferenceMessages() { - // Do not instantiate - } - - static { - NLS.initializeMessages(BUNDLE_NAME, PreferenceMessages.class); - } - -} diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/ui/preferences/PreferenceMessages.properties b/jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/ui/preferences/PreferenceMessages.properties deleted file mode 100644 index c7c72051b..000000000 --- a/jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/ui/preferences/PreferenceMessages.properties +++ /dev/null @@ -1,3 +0,0 @@ -PDPreferences_description=Preferences for the design page of Web Page Editor. -EditorPreferences_LABEL_CSSArtificalCellPadding=Add Artificial Padding Around Containers: -EditorPreferences_LABEL_CSSEnableAbsolutePositioning=Enable Absolute CSS Position
\ No newline at end of file |