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
Modifier and TypeClassDescriptionclass
An event handler for listening to changes to the children of an element container. -
Field Summary
Modifier and TypeFieldDescriptionstatic final boolean
Default default value for MRU behavior.static final String
Key to control the actual boolean preference of the "most recently used" order enablementstatic final String
Key to control the default default value of the "most recently used" order enablementstatic final int
The threshold to show the onbarding image.static final int
(Left, Right, Bottom) Spacing for onboarding composite, needed so that tabfolder borders are shownstatic final int
Top spacing for onboarding composite, needed so that tabfolder borders are shownstatic final String
Fields inherited from class org.eclipse.e4.ui.internal.workbench.swt.AbstractPartRenderer
context, modelService, OWNING_ME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
adjustTopRight
(CTabFolder tabFolder) void
childRendered
(MElementContainer<MUIElement> parentElement, MUIElement element) void
protected void
createTab
(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 MMenu
getViewMenu
(MPart part) void
hideChild
(MElementContainer<MUIElement> parentElement, MUIElement child) void
protected boolean
void
init()
protected boolean
isClosable
(MPart part) protected boolean
isDetachable
(MPart part) protected void
populateTabMenu
(Menu menu, MPart part) Populate the tab's context menu for the given part.protected boolean
requiresFocus
(MPart element) Check if activatingelement
requires that the part set the focus.void
showAvailableItems
(MElementContainer<?> stack, CTabFolder tabFolder) Shows a popup dialog with the list of editors availavle in a givenCTabFolder
.void
showAvailableItems
(MElementContainer<?> stack, CTabFolder tabFolder, boolean forceCenter) Shows a popup dialog with the list of editors available in the given CTabFolder.protected void
protected void
showTab
(MUIElement element) protected void
Methods inherited from class org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer
contextDisposed, init, postProcess, processContents
Methods 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, unbindWidget
Methods 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.AbstractPartRenderer
Check if activatingelement
requires that the part set the focus.- Overrides:
requiresFocus
in classSWTPartRenderer
- Returns:
- true if the part requires focus
-
init
@PostConstruct public void init() -
updateTab
-
contextDisposed
@PreDestroy public void contextDisposed() -
createWidget
- Specified by:
createWidget
in classorg.eclipse.e4.ui.internal.workbench.swt.AbstractPartRenderer
-
adjustTopRight
-
createTab
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 classLazyStackRenderer
- Parameters:
stack
- The parent model elementelement
- The child to show the affordance for
-
childRendered
- Overrides:
childRendered
in classLazyStackRenderer
-
findItemForPart
-
hideChild
- Overrides:
hideChild
in classLazyStackRenderer
-
hookControllerLogic
- Overrides:
hookControllerLogic
in 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. IfforceCenter
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
- Overrides:
showTab
in 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:
imageChanged
in classSWTPartRenderer
-