org.eclipse.palamedes.ui.preferences.stylesheets
Class StylesheetPreferencePage

java.lang.Object
  extended by org.eclipse.jface.dialogs.DialogPage
      extended by org.eclipse.jface.preference.PreferencePage
          extended by org.eclipse.palamedes.ui.preferences.stylesheets.StylesheetPreferencePage
All Implemented Interfaces:
org.eclipse.jface.dialogs.IDialogPage, org.eclipse.jface.dialogs.IMessageProvider, org.eclipse.jface.preference.IPreferencePage, org.eclipse.ui.IWorkbenchPreferencePage

public class StylesheetPreferencePage
extends org.eclipse.jface.preference.PreferencePage
implements org.eclipse.ui.IWorkbenchPreferencePage


Field Summary
 
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
ERROR, INFORMATION, NONE, WARNING
 
Constructor Summary
StylesheetPreferencePage()
           
 
Method Summary
protected  org.eclipse.swt.widgets.Control createContents(org.eclipse.swt.widgets.Composite ancestor)
           
protected  Stylesheet editStylesheet(Stylesheet stylesheet, boolean edit, boolean isNameModifiable)
          Creates the edit dialog.
protected  java.lang.String getFormatterPreferenceKey()
          Returns the key to use for the formatter preference.
 StylesheetStore getStylesheetStore()
           
 void init(org.eclipse.ui.IWorkbench workbench)
          Creates the field editors.
protected  boolean isShowFormatterSetting()
          Returns whether the formatter preference checkbox should be shown.
 boolean performCancel()
           
 boolean performOk()
           
 void setStylesheetStore(StylesheetStore stylesheetStore)
           
protected  void updateButtons()
          Updates the buttons.
protected  void updateViewerInput()
          Updates the XSL viewer.
 
Methods inherited from class org.eclipse.jface.preference.PreferencePage
applyData, applyDialogFont, computeSize, contributeButtons, createControl, createDescriptionLabel, createNoteComposite, doComputeSize, doGetPreferenceStore, getApplyButton, getContainer, getDefaultsButton, getPreferenceStore, isValid, noDefaultAndApplyButton, okToLeave, performApply, performDefaults, performHelp, setContainer, setErrorMessage, setMessage, setPreferenceStore, setSize, setTitle, setValid, toString, updateApplyButton
 
Methods inherited from class org.eclipse.jface.dialogs.DialogPage
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getImage, getMessage, getMessageType, getShell, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, setButtonLayoutData, setControl, setDescription, setImageDescriptor, setMessage, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.preference.IPreferencePage
computeSize, isValid, okToLeave, setContainer, setSize
 
Methods inherited from interface org.eclipse.jface.dialogs.IDialogPage
createControl, dispose, getControl, getDescription, getErrorMessage, getImage, getMessage, getTitle, performHelp, setDescription, setImageDescriptor, setTitle, setVisible
 

Constructor Detail

StylesheetPreferencePage

public StylesheetPreferencePage()
Method Detail

createContents

protected org.eclipse.swt.widgets.Control createContents(org.eclipse.swt.widgets.Composite ancestor)
Specified by:
createContents in class org.eclipse.jface.preference.PreferencePage

editStylesheet

protected Stylesheet editStylesheet(Stylesheet stylesheet,
                                    boolean edit,
                                    boolean isNameModifiable)
Creates the edit dialog. Subclasses may override this method to provide a custom dialog.

Parameters:
stylesheet - the style sheet being edited
edit - whether the dialog should be editable
isNameModifiable - whether the style sheet name may be modified
Returns:
the created or modified style sheet, or null if the edition failed

getFormatterPreferenceKey

protected java.lang.String getFormatterPreferenceKey()
Returns the key to use for the formatter preference.

Returns:
the formatter preference key

getStylesheetStore

public StylesheetStore getStylesheetStore()

init

public void init(org.eclipse.ui.IWorkbench workbench)
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.

Specified by:
init in interface org.eclipse.ui.IWorkbenchPreferencePage

isShowFormatterSetting

protected boolean isShowFormatterSetting()
Returns whether the formatter preference checkbox should be shown.

Returns:
true if the formatter preference checkbox should be shown, false otherwise

performCancel

public boolean performCancel()
Specified by:
performCancel in interface org.eclipse.jface.preference.IPreferencePage
Overrides:
performCancel in class org.eclipse.jface.preference.PreferencePage

performOk

public boolean performOk()
Specified by:
performOk in interface org.eclipse.jface.preference.IPreferencePage
Overrides:
performOk in class org.eclipse.jface.preference.PreferencePage

setStylesheetStore

public void setStylesheetStore(StylesheetStore stylesheetStore)

updateButtons

protected void updateButtons()
Updates the buttons.


updateViewerInput

protected void updateViewerInput()
Updates the XSL viewer.