Class StackRenderer
java.lang.Object
org.eclipse.e4.ui.internal.workbench.swt.AbstractPartRenderer
org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer
org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer
org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer
SWT default renderer for a MPartStack model elements
Style bits for the underlying CTabFolder can be set via the
IPresentation.STYLE_OVERRIDE_KEY key
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassAn event handler for listening to changes to the children of an element container. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanDefault default value for MRU behavior.static final StringKey to control the actual boolean preference of the "most recently used" order enablementstatic final StringKey to control the default default value of the "most recently used" order enablementstatic final intThe threshold to show the onbarding image.static final int(Left, Right, Bottom) Spacing for onboarding composite, needed so that tabfolder borders are shownstatic final intTop spacing for onboarding composite, needed so that tabfolder borders are shownstatic final StringFields inherited from class org.eclipse.e4.ui.internal.workbench.swt.AbstractPartRenderer
context, modelService, OWNING_ME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadjustTopRight(CTabFolder tabFolder) voidchildRendered(MElementContainer<MUIElement> parentElement, MUIElement element) voidprotected voidcreateTab(MElementContainer<MUIElement> stack, MUIElement element) This method is necessary to allow the parent container to show affordance (i.e. tabs) for child elements -without- creating the actual partcreateWidget(MUIElement element, Object parent) findItemForPart(MPart part) static MMenugetViewMenu(MPart part) voidhideChild(MElementContainer<MUIElement> parentElement, MUIElement child) voidprotected booleanvoidinit()protected booleanisClosable(MPart part) protected booleanisDetachable(MPart part) protected voidpopulateTabMenu(Menu menu, MPart part) Populate the tab's context menu for the given part.protected booleanrequiresFocus(MPart element) Check if activatingelementrequires that the part set the focus.voidshowAvailableItems(MElementContainer<?> stack, CTabFolder tabFolder) Shows a popup dialog with the list of editors availavle in a givenCTabFolder.voidshowAvailableItems(MElementContainer<?> stack, CTabFolder tabFolder, boolean forceCenter) Shows a popup dialog with the list of editors available in the given CTabFolder.protected voidprotected voidshowTab(MUIElement element) protected voidMethods inherited from class org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer
contextDisposed, init, postProcess, processContentsMethods inherited from class org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer
bindWidget, calcIndex, calcVisibleIndex, disposeWidget, forceFocus, getImage, getImageFromURI, getModelElement, getParentWidget, getToolTip, init, reapplyStyles, setCSSInfo, styleElement, unbindWidgetMethods inherited from class org.eclipse.e4.ui.internal.workbench.swt.AbstractPartRenderer
activate, getContext, getContextForParent, getStyleOverride, getUIContainer, removeGui
-
Field Details
-
MRU_KEY_DEFAULT
Key to control the default default value of the "most recently used" order enablement- See Also:
-
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_DEFAULTDefault default value for MRU behavior.- See Also:
-
TAG_VIEW_MENU
- See Also:
-
ONBOARDING_TOP_SPACING
public static final int ONBOARDING_TOP_SPACINGTop 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_THRESHOLDThe 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
Description copied from class:org.eclipse.e4.ui.internal.workbench.swt.AbstractPartRendererCheck if activatingelementrequires that the part set the focus.- Overrides:
requiresFocusin classSWTPartRenderer- Returns:
- true if the part requires focus
-
init
@PostConstruct public void init() -
updateTab
-
contextDisposed
@PreDestroy public void contextDisposed() -
createWidget
- Specified by:
createWidgetin classorg.eclipse.e4.ui.internal.workbench.swt.AbstractPartRenderer
-
adjustTopRight
-
createTab
Description copied from class:LazyStackRendererThis method is necessary to allow the parent container to show affordance (i.e. tabs) for child elements -without- creating the actual part- Overrides:
createTabin classLazyStackRenderer- Parameters:
stack- The parent model elementelement- The child to show the affordance for
-
childRendered
- Overrides:
childRenderedin classLazyStackRenderer
-
findItemForPart
-
hideChild
- Overrides:
hideChildin classLazyStackRenderer
-
hookControllerLogic
- Overrides:
hookControllerLogicin classSWTPartRenderer
-
showAvailableItems
Shows a popup dialog with the list of editors availavle in a givenCTabFolder. 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. IfforceCenterenabled, 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
- Overrides:
showTabin classLazyStackRenderer
-
showMenu
-
isClosable
-
populateTabMenu
Populate the tab's context menu for the given part.- Parameters:
menu- the menu to be populatedpart- the relevant part
-
isDetachable
-
getViewMenu
-
imageChanged
protected boolean imageChanged()- Overrides:
imageChangedin classSWTPartRenderer
-