Class StackRenderer


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


      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:

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

      public static final String TAG_VIEW_MENU
      See Also:

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

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

      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.
      requiresFocus in class SWTPartRenderer
      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
      createTab in class LazyStackRenderer
      stack - The parent model element
      element - The child to show the affordance for
    • childRendered

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

      public CTabItem findItemForPart(MPart part)
    • hideChild

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

      public void hookControllerLogic(MUIElement me)
      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
      forceCenter - center the dialog if true
    • showTab

      protected void showTab(MUIElement element)
      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.
      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()
      imageChanged in class SWTPartRenderer