Class VtlArgumentProviderPreferencePage

  • 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 VtlArgumentProviderPreferencePage
    extends org.eclipse.jface.preference.PreferencePage
    implements org.eclipse.ui.IWorkbenchPreferencePage, org.eclipse.swt.widgets.Listener
    Implements the providers - preference - page. Existing Providers are shown in the table. Providers can be customized using this page. The user can de-/ activate providers, add and/or delete arguments by typing them into the relevant row.
    Author:
    Niko Nowatzki
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.eclipse.swt.widgets.Table providers  
      private static java.lang.String[] TITLES  
      • Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider

        ERROR, INFORMATION, NONE, WARNING
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void addTable​(org.eclipse.swt.widgets.Composite parent)
      Create table which shows the providers.
      static int availableRows​(org.eclipse.swt.widgets.Composite parent)
      Return the number of rows available in the current display using the current font.
      protected void contributeButtons​(org.eclipse.swt.widgets.Composite parent)  
      protected org.eclipse.swt.widgets.Control createContents​(org.eclipse.swt.widgets.Composite parent)
      void handleEvent​(org.eclipse.swt.widgets.Event event)  
      void init​(org.eclipse.ui.IWorkbench workbench)  
      private void makeModifiable()
      Make the editor modifiable.
      protected void performApply()
      When apply-button is pressed store if providers are active or not.
      • Methods inherited from class org.eclipse.jface.preference.PreferencePage

        applyData, applyDialogFont, computeSize, createControl, createDescriptionLabel, createNoteComposite, doComputeSize, doGetPreferenceStore, getApplyButton, getContainer, getDefaultsButton, getPreferenceStore, isValid, noDefaultAndApplyButton, noDefaultButton, okToLeave, performCancel, performDefaults, 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
      • Methods inherited from interface org.eclipse.jface.dialogs.IDialogPage

        createControl, dispose, getControl, getDescription, getErrorMessage, getImage, getMessage, getTitle, performHelp, setDescription, setImageDescriptor, setTitle, setVisible
      • Methods inherited from interface org.eclipse.jface.preference.IPreferencePage

        computeSize, isValid, okToLeave, performCancel, performOk, setContainer, setSize
    • Field Detail

      • TITLES

        private static final java.lang.String[] TITLES
      • providers

        private org.eclipse.swt.widgets.Table providers
    • Constructor Detail

      • VtlArgumentProviderPreferencePage

        public VtlArgumentProviderPreferencePage()
    • Method Detail

      • createContents

        protected org.eclipse.swt.widgets.Control createContents​(org.eclipse.swt.widgets.Composite parent)
        Specified by:
        createContents in class org.eclipse.jface.preference.PreferencePage
      • contributeButtons

        protected void contributeButtons​(org.eclipse.swt.widgets.Composite parent)
        Overrides:
        contributeButtons in class org.eclipse.jface.preference.PreferencePage
      • performApply

        protected void performApply()
        When apply-button is pressed store if providers are active or not. Moreover store the arguments.
        Overrides:
        performApply in class org.eclipse.jface.preference.PreferencePage
      • addTable

        private void addTable​(org.eclipse.swt.widgets.Composite parent)
        Create table which shows the providers.
        Parameters:
        parent - the parent.
      • makeModifiable

        private void makeModifiable()
        Make the editor modifiable.
      • availableRows

        public static int availableRows​(org.eclipse.swt.widgets.Composite parent)
        Return the number of rows available in the current display using the current font.
        Parameters:
        parent - The Composite whose Font will be queried.
        Returns:
        the result of the display size divided by the font size.
      • init

        public void init​(org.eclipse.ui.IWorkbench workbench)
        Specified by:
        init in interface org.eclipse.ui.IWorkbenchPreferencePage
      • handleEvent

        public void handleEvent​(org.eclipse.swt.widgets.Event event)
        Specified by:
        handleEvent in interface org.eclipse.swt.widgets.Listener