Class TabbedPropertySheetPage

    • Constructor Detail

      • TabbedPropertySheetPage

        public TabbedPropertySheetPage​(ITabbedPropertySheetPageContributor tabbedPropertySheetPageContributor)
        create a new tabbed property sheet page.
        Parameters:
        tabbedPropertySheetPageContributor - the tabbed property sheet page contributor.
      • TabbedPropertySheetPage

        public TabbedPropertySheetPage​(ITabbedPropertySheetPageContributor tabbedPropertySheetPageContributor,
                                       boolean showTitleBar)
        create a new tabbed property sheet page.
        Parameters:
        tabbedPropertySheetPageContributor - the tabbed property sheet page contributor.
        showTitleBar - boolean indicating if the title bar should be shown; default value is true
        Since:
        3.5
    • Method Detail

      • handlePartActivated

        protected void handlePartActivated​(IWorkbenchPart part)
        Handle the part activated event.
        Parameters:
        part - the new activated part.
      • getTabListContentProvider

        protected IStructuredContentProvider getTabListContentProvider()
        Gets the tab list content provider for the contributor.
        Returns:
        the tab list content provider for the contributor.
      • disposeContributor

        protected void disposeContributor()
        Dispose the contributor with the provided contributor id. This happens on part close as well as when contributors switch between the workbench part and contributor from a selection.
        Since:
        3.6
      • dispose

        public void dispose()
        Description copied from class: Page
        The Page implementation of this IPage method disposes of this page's control (if it has one and it has not already been disposed). Subclasses may extend.
        Specified by:
        dispose in interface IPage
        Overrides:
        dispose in class Page
        See Also:
        IPage.dispose()
      • getControl

        public Control getControl()
        Description copied from class: Page
        The Page implementation of this IPage method returns null. Subclasses must reimplement.
        Specified by:
        getControl in interface IPage
        Specified by:
        getControl in class Page
        Returns:
        the SWT control for this page, or null if this page does not have a control
        See Also:
        IPage.getControl()
      • setFocus

        public void setFocus()
        Description copied from class: Page
        The Page implementation of this IPage method does nothing. Subclasses must implement.
        Specified by:
        setFocus in interface IPage
        Specified by:
        setFocus in class Page
        See Also:
        IPage.setFocus()
      • resizeScrolledComposite

        public void resizeScrolledComposite()
        Resize the scrolled composite enclosing the sections, which may result in the addition or removal of scroll bars.
        Since:
        3.5
      • disposeTabs

        protected void disposeTabs​(Collection tabs)
        Disposes the TabContents objects passed to this method. If the 'currentTab' is going to be disposed, then the caller should call aboutToBeHidden() on the currentTab and set it to null before calling this method. Also, the caller needs to ensure that descriptorToTab map entries corresponding to the disposed TabContents objects are also removed.
        Parameters:
        tabs -
        Since:
        3.6
      • updateTabs

        protected void updateTabs​(ITabDescriptor[] descriptors)
        Update the current tabs to represent the given input object. When tabs apply for both the old and new input they are reused otherwise they are disposed. If the current visible tab will not be reused (i.e. will be disposed) we have to send it an aboutToBeHidden() message.
        Since:
        3.4
      • createTab

        protected TabContents createTab​(ITabDescriptor tabDescriptor)
        Create the tab contents for the provided tab descriptor.
        Parameters:
        tabDescriptor - the tab descriptor.
        Returns:
        the tab contents.
        Since:
        3.4
      • refresh

        public void refresh()
        Refresh the currently active tab.
      • getCurrentTab

        public TabContents getCurrentTab()
        Get the currently active tab.
        Returns:
        the currently active tab.
        Since:
        3.4
      • addTabSelectionListener

        public void addTabSelectionListener​(ITabSelectionListener listener)
        Add a tab selection listener.
        Parameters:
        listener - a tab selection listener.
      • removeTabSelectionListener

        public void removeTabSelectionListener​(ITabSelectionListener listener)
        Remove a tab selection listener.
        Parameters:
        listener - a tab selection listener.
      • getSelectedTab

        public ITabDescriptor getSelectedTab()
        Returns the currently selected tab.
        Returns:
        the currently selected tab or null if there is no tab selected.
        Since:
        3.5
      • getActiveTabs

        public ITabDescriptor[] getActiveTabs()
        Returns the list of currently active tabs.
        Returns:
        the currently active tabs.
        Since:
        3.5
      • setSelectedTab

        public void setSelectedTab​(String id)
        Set the currently selected tab to be that of the provided tab id.
        Parameters:
        id - The string id of the tab to select.
        Since:
        3.5
      • getTitleText

        public String getTitleText​(ISelection selection)
        Returns text of the properties title for given selection. If selection is null, then currentSelection is used
        Parameters:
        selection - Selection whose properties title text is to be returned
        Returns:
        String representing title text.
        Since:
        3.5
      • getTitleImage

        public Image getTitleImage​(ISelection selection)
        Returns the title image for given selection. If selection is null, then currentSelection is used.
        Parameters:
        selection - Selection whose properties title image is to be returned
        Returns:
        Image that is used as a title image.
        Since:
        3.5
      • getTabContents

        protected TabContents getTabContents​(ITabDescriptor tabDescriptor)
        Returns the TabContents object corresponding to the given tab-descriptor.
        Parameters:
        tabDescriptor - tab-descriptor whose TabContents object is to be returned
        Returns:
        TabContents object corresponding to the given tab-descriptor key in descriptorToTab map, or null if the key does not exist in the map
        Since:
        3.6
      • getSelectionContributor

        protected ITabbedPropertySheetPageContributor getSelectionContributor()
        Get the current selection-contributor if any
        Returns:
        The selection-contributor, or null.
        Since:
        3.6
      • getCurrentContributorId

        protected String getCurrentContributorId()
        Get the currently active contributor id. It may not match the contributor id from the workbench part that created this instance because if all the elements in a structured selection implement ITabbedPropertySheetPageContributor and they all return the same unique contributor ID, then tabs and sections associated with that contributor ID are used by the tabbed property view for that selection.
        Returns:
        contributor id
        Since:
        3.6
      • getCurrentSelection

        protected ISelection getCurrentSelection()
        Get the current selection
        Returns:
        selection
        Since:
        3.6