Class GlobalPathPreferencePage
- java.lang.Object
-
- org.eclipse.jface.dialogs.DialogPage
-
- org.eclipse.jface.preference.PreferencePage
-
- net.ssehub.easy.producer.ui.configuration.GlobalPathPreferencePage
-
- All Implemented Interfaces:
org.eclipse.jface.dialogs.IDialogPage,org.eclipse.jface.dialogs.IMessageProvider,org.eclipse.jface.preference.IPreferencePage,org.eclipse.swt.widgets.Listener,org.eclipse.ui.IWorkbenchPreferencePage
public class GlobalPathPreferencePage extends org.eclipse.jface.preference.PreferencePage implements org.eclipse.ui.IWorkbenchPreferencePage, org.eclipse.swt.widgets.ListenerImplements the global EASy path preference page. The user can change the global ivml-, vil and/or vtl-Path. Initially, the input fields hold the current values. The user can restore the default values which are stored in the default Configuration. Moreover the user can change these paths by typing in new ones. As paths are interpreted as project local paths, selection buttons do not make sense here. After pressing the apply-Button the new values are stored in the default configuration and the Eclipse Preference-Store.- Author:
- Niko Nowatzki, Holger Eichelberger
-
-
Constructor Summary
Constructors Constructor Description GlobalPathPreferencePage()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcreateConfigurationDialogs(org.eclipse.swt.widgets.Composite pageComponent)Create the dialogs.protected org.eclipse.swt.widgets.ControlcreateContents(org.eclipse.swt.widgets.Composite parent)voidhandleEvent(org.eclipse.swt.widgets.Event event)voidinit(org.eclipse.ui.IWorkbench workbench)protected voidperformApply()protected voidperformDefaults()private voidsetDefaultValues()Set the default values for the 3 paths.private static voidsetPath(org.eclipse.swt.widgets.Text source, Configuration.PathKind kind)Sets the path fromsourcetokind.-
Methods inherited from class org.eclipse.jface.preference.PreferencePage
applyData, applyDialogFont, computeSize, contributeButtons, createControl, createDescriptionLabel, createNoteComposite, doComputeSize, doGetPreferenceStore, getApplyButton, getContainer, getDefaultsButton, getPreferenceStore, isValid, noDefaultAndApplyButton, noDefaultButton, okToLeave, performCancel, performHelp, performOk, 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
-
-
-
-
Method Detail
-
init
public void init(org.eclipse.ui.IWorkbench workbench)
- Specified by:
initin interfaceorg.eclipse.ui.IWorkbenchPreferencePage
-
createContents
protected org.eclipse.swt.widgets.Control createContents(org.eclipse.swt.widgets.Composite parent)
- Specified by:
createContentsin classorg.eclipse.jface.preference.PreferencePage
-
createConfigurationDialogs
private void createConfigurationDialogs(org.eclipse.swt.widgets.Composite pageComponent)
Create the dialogs. 3 labels for users info. 3 TextFields for user input. 1 Button for applying the input. The values will be stored in the preference store. 1 Button for restoring the default values.- Parameters:
pageComponent- The PageComponent.
-
setPath
private static void setPath(org.eclipse.swt.widgets.Text source, Configuration.PathKind kind)Sets the path fromsourcetokind.- Parameters:
source- the source UI elementkind- the target path kind
-
performApply
protected void performApply()
- Overrides:
performApplyin classorg.eclipse.jface.preference.PreferencePage
-
performDefaults
protected void performDefaults()
- Overrides:
performDefaultsin classorg.eclipse.jface.preference.PreferencePage
-
setDefaultValues
private void setDefaultValues()
Set the default values for the 3 paths.
-
handleEvent
public void handleEvent(org.eclipse.swt.widgets.Event event)
- Specified by:
handleEventin interfaceorg.eclipse.swt.widgets.Listener
-
-