Class StackRenderer

java.lang.Object
org.eclipse.e4.ui.internal.workbench.swt.AbstractPartRenderer

public class StackRenderer extends LazyStackRenderer
SWT default renderer for a MPartStack model elements Style bits for the underlying CTabFolder can be set via the IPresentation.STYLE_OVERRIDE_KEY key
  • Field Details

    • MRU_KEY_DEFAULT

      public static final String MRU_KEY_DEFAULT
      Key to control the default default value of the "most recently used" order enablement
      See Also:
    • MRU_KEY

      public static final String MRU_KEY
      Key to control the actual boolean preference of the "most recently used" order enablement
      See Also:
    • MRU_DEFAULT

      public static final boolean MRU_DEFAULT
      Default default value for MRU behavior.
      See Also:
    • TAG_VIEW_MENU

      public static final String TAG_VIEW_MENU
      See Also:
    • ONBOARDING_TOP_SPACING

      public static final int ONBOARDING_TOP_SPACING
      Top spacing for onboarding composite, needed so that tabfolder borders are shown
      See Also:
    • ONBOARDING_SPACING

      public static final int ONBOARDING_SPACING
      (Left, Right, Bottom) Spacing for onboarding composite, needed so that tabfolder borders are shown
      See Also:
    • ONBOARDING_SHOW_IMAGE_HEIGHT_THRESHOLD

      public static final int ONBOARDING_SHOW_IMAGE_HEIGHT_THRESHOLD
      The threshold to show the onbarding image. If tabfolder height gets below this threshold, the image is hidden.
      See Also:
  • Constructor Details

    • StackRenderer

      public StackRenderer()
  • Method Details

    • requiresFocus

      protected boolean requiresFocus(MPart element)
      Description copied from class: org.eclipse.e4.ui.internal.workbench.swt.AbstractPartRenderer
      Check if activating element requires that the part set the focus.
      Overrides:
      requiresFocus in class SWTPartRenderer
      Returns:
      true if the part requires focus
    • init

      @PostConstruct public void init()
    • updateTab

      protected void updateTab(CTabItem cti, MPart part, String attName, Object newValue)
    • contextDisposed

      @PreDestroy public void contextDisposed()
    • createWidget

      public Object createWidget(MUIElement element, Object parent)
      Specified by:
      createWidget in class org.eclipse.e4.ui.internal.workbench.swt.AbstractPartRenderer
    • adjustTopRight

      public void adjustTopRight(CTabFolder tabFolder)
    • createTab

      protected void createTab(MElementContainer<MUIElement> stack, MUIElement element)
      Description copied from class: LazyStackRenderer
      This method is necessary to allow the parent container to show affordance (i.e. tabs) for child elements -without- creating the actual part
      Overrides:
      createTab in class LazyStackRenderer
      Parameters:
      stack - The parent model element
      element - The child to show the affordance for
    • childRendered

      public void childRendered(MElementContainer<MUIElement> parentElement, MUIElement element)
      Overrides:
      childRendered in class LazyStackRenderer
    • findItemForPart

      public CTabItem findItemForPart(MPart part)
    • hideChild

      public void hideChild(MElementContainer<MUIElement> parentElement, MUIElement child)
      Overrides:
      hideChild in class LazyStackRenderer
    • hookControllerLogic

      public void hookControllerLogic(MUIElement me)
      Overrides:
      hookControllerLogic in class SWTPartRenderer
    • showAvailableItems

      public void showAvailableItems(MElementContainer<?> stack, CTabFolder tabFolder)
      Shows a popup dialog with the list of editors availavle in a given CTabFolder. By default the popup origin will be located close to the chevron location.
    • showAvailableItems

      public void showAvailableItems(MElementContainer<?> stack, CTabFolder tabFolder, boolean forceCenter)
      Shows a popup dialog with the list of editors available in the given CTabFolder. If forceCenter enabled, the dialog is centered horizontally; otherwise, the dialog origin is placed at chevron location. he dialog is placed at
      Parameters:
      forceCenter - center the dialog if true
    • showTab

      protected void showTab(MUIElement element)
      Overrides:
      showTab in class LazyStackRenderer
    • showMenu

      protected void showMenu(ToolItem item)
    • isClosable

      protected boolean isClosable(MPart part)
    • populateTabMenu

      protected void populateTabMenu(Menu menu, MPart part)
      Populate the tab's context menu for the given part.
      Parameters:
      menu - the menu to be populated
      part - the relevant part
    • isDetachable

      protected boolean isDetachable(MPart part)
    • getViewMenu

      public static MMenu getViewMenu(MPart part)
    • imageChanged

      protected boolean imageChanged()
      Overrides:
      imageChanged in class SWTPartRenderer