Class ModifyDialogTabPage

    • Field Detail

      • fShowInvisibleButton

        protected org.eclipse.swt.widgets.Button fShowInvisibleButton
      • fUpdater

        protected final java.util.Observer fUpdater
        This is the default listener for any of the Preference classes. It is added by the respective factory methods and updates the page's preview on each change.
      • fDefaultFocusManager

        protected final ModifyDialogTabPage.DefaultFocusManager fDefaultFocusManager
        The default focus manager. This widget knows all widgets which can have the focus and listens for focusGained events, on which it stores the index of the current focus holder. When the dialog is restarted, restoreFocus() sets the focus to the last control which had it. The standard Preference object are managed by this focus manager if they are created using the respective factory methods. Other SWT widgets can be added in subclasses when they are created.
      • fPixelConverter

        protected org.eclipse.jface.layout.PixelConverter fPixelConverter
        A pixel converter for layout calculations
      • fWorkingValues

        protected java.util.Map<java.lang.String,​java.lang.String> fWorkingValues
        The map where the current settings are stored.
    • Constructor Detail

      • ModifyDialogTabPage

        public ModifyDialogTabPage()
    • Method Detail

      • setWorkingValues

        public void setWorkingValues​(java.util.Map<java.lang.String,​java.lang.String> workingValues)
        A map containing key value pairs this tab page is must modify.
        Specified by:
        setWorkingValues in interface IModifyDialogTabPage
        Parameters:
        workingValues - the values to work with
      • createContents

        public org.eclipse.swt.widgets.Composite createContents​(org.eclipse.swt.widgets.Composite parent)
        Create the contents of this tab page.

        Subclasses should implement doCreatePreferences and doCreatePreview may also be overridden as necessary.

        Specified by:
        createContents in interface IModifyDialogTabPage
        Parameters:
        parent - The parent composite
        Returns:
        Created content control
      • initializePage

        protected abstract void initializePage()
        This method is called after all controls have been allocated, including the preview. It can be used to set the preview text and to create listeners.
      • doCreatePreferences

        protected abstract void doCreatePreferences​(org.eclipse.swt.widgets.Composite composite,
                                                    int numColumns)
        Create the left side of the modify dialog. This is meant to be implemented by subclasses.
        Parameters:
        composite - Composite to create in
        numColumns - Number of columns to use
      • doCreatePreviewPane

        protected org.eclipse.swt.widgets.Composite doCreatePreviewPane​(org.eclipse.swt.widgets.Composite composite,
                                                                        int numColumns)
        Create the right side of the modify dialog. By default, the preview is displayed there. Subclasses can override this method in order to customize the right-hand side of the dialog.
        Parameters:
        composite - Composite to create in
        numColumns - Number of columns to use
        Returns:
        Created composite
      • doCreateAtlPreview

        protected abstract AtlPreview doCreateAtlPreview​(org.eclipse.swt.widgets.Composite parent)
        To be implemented by subclasses. This method should return an instance of JavaPreview. Currently, the choice is between CompilationUnitPreview which contains a valid compilation unit, or a SnippetPreview which formats several independent code snippets and displays them in the same window.
        Parameters:
        parent - Parent composite
        Returns:
        Created preview
      • makeVisible

        public final void makeVisible()
        This is called when the page becomes visible. Common tasks to do include:
        • Updating the preview.
        • Setting the focus
        Specified by:
        makeVisible in interface IModifyDialogTabPage
      • doUpdatePreview

        protected abstract void doUpdatePreview()
        Update the preview. To be implemented by subclasses.
      • notifyValuesModified

        protected void notifyValuesModified()
      • setInitialFocus

        public void setInitialFocus()
        Each tab page should remember where its last focus was, and reset it correctly within this method. This method is only called after initialization on the first tab page to be displayed in order to restore the focus of the last session.
        Specified by:
        setInitialFocus in interface IModifyDialogTabPage
      • updateStatus

        protected void updateStatus​(org.eclipse.core.runtime.IStatus status)
        Set the status field on the dialog. This can be used by tab pages to report inconsistent input. The OK button is disabled if the kind is IStatus.ERROR.
        Parameters:
        status - Status describing the current page error state
      • createGridLayout

        protected org.eclipse.swt.layout.GridLayout createGridLayout​(int numColumns,
                                                                     boolean margins)
      • createGridData

        protected static org.eclipse.swt.layout.GridData createGridData​(int numColumns,
                                                                        int style,
                                                                        int widthHint)
      • createLabel

        protected static org.eclipse.swt.widgets.Label createLabel​(int numColumns,
                                                                   org.eclipse.swt.widgets.Composite parent,
                                                                   java.lang.String text)
      • createLabel

        protected static org.eclipse.swt.widgets.Label createLabel​(int numColumns,
                                                                   org.eclipse.swt.widgets.Composite parent,
                                                                   java.lang.String text,
                                                                   int gridDataStyle)
      • createGroup

        protected org.eclipse.swt.widgets.Group createGroup​(int numColumns,
                                                            org.eclipse.swt.widgets.Composite parent,
                                                            java.lang.String text)
      • createNumberPref

        protected ModifyDialogTabPage.NumberPreference createNumberPref​(org.eclipse.swt.widgets.Composite composite,
                                                                        int numColumns,
                                                                        java.lang.String name,
                                                                        java.lang.String key,
                                                                        int minValue,
                                                                        int maxValue)
      • createStringPref

        protected ModifyDialogTabPage.StringPreference createStringPref​(org.eclipse.swt.widgets.Composite composite,
                                                                        int numColumns,
                                                                        java.lang.String name,
                                                                        java.lang.String key,
                                                                        org.eclipse.jface.dialogs.IInputValidator inputValidator)
      • createComboPref

        protected ModifyDialogTabPage.ComboPreference createComboPref​(org.eclipse.swt.widgets.Composite composite,
                                                                      int numColumns,
                                                                      java.lang.String name,
                                                                      java.lang.String key,
                                                                      java.lang.String[] values,
                                                                      java.lang.String[] items)
      • createCheckboxPref

        protected ModifyDialogTabPage.CheckboxPreference createCheckboxPref​(org.eclipse.swt.widgets.Composite composite,
                                                                            int numColumns,
                                                                            java.lang.String name,
                                                                            java.lang.String key,
                                                                            java.lang.String[] values)
      • createRadioPref

        protected ModifyDialogTabPage.RadioPreference createRadioPref​(org.eclipse.swt.widgets.Composite composite,
                                                                      int numColumns,
                                                                      java.lang.String name,
                                                                      java.lang.String key,
                                                                      java.lang.String[] values)
      • setPreview

        public void setPreview​(AtlPreview fPreview)
      • getShowInvisibleButton

        public org.eclipse.swt.widgets.Button getShowInvisibleButton()
      • updateTab

        public abstract void updateTab​(boolean enabled)