# Class LazyStackRenderer

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

Direct Known Subclasses:
  `PerspectiveStackRenderer, StackRenderer`

public abstract class LazyStackRenderer extends SWTPartRenderer
This class encapsulates the functionality necessary to manage stacks of parts in a 'lazy loading' manner. For these stacks only the currently 'active' child most be rendered so in this class we over ride that default behavior for processing the stack's contents to prevent all of the contents from being rendered, calling 'childAdded' instead. This not only saves time and SWT resources but is necessary in an IDE world where we must not arbitrarily cause plug-in loading.

## Field Summary

### Fields inherited from class org.eclipse.e4.ui.internal.workbench.swt.AbstractPartRenderer

`context, modelService, OWNING_ME`

## Constructor Summary

Constructors
Constructor
Description
`LazyStackRenderer()`

## Method Summary

Modifier and Type
Method
Description
`void`
`childRendered(MElementContainer<MUIElement> parentElement, MUIElement element)`
`void`
`contextDisposed(IEventBroker eventBroker)`
`protected void`
`createTab(MElementContainer<MUIElement> me, MUIElement part)`
This method is necessary to allow the parent container to show affordance (i.e. tabs) for child elements -without- creating the actual part
`void`
`hideChild(MElementContainer<MUIElement> parentElement, MUIElement child)`
`void`
`init(IEventBroker eventBroker)`
`void`
`postProcess(MUIElement element)`
`void`
`processContents(MElementContainer<MUIElement> me)`
`protected void`
`showTab(MUIElement element)`

### Methods inherited from class SWTPartRenderer

`bindWidget, calcIndex, calcVisibleIndex, disposeWidget, forceFocus, getImage, getImageFromURI, getModelElement, getParentWidget, getToolTip, hookControllerLogic, imageChanged, init, reapplyStyles, requiresFocus, setCSSInfo, styleElement, unbindWidget`

### Methods inherited from class org.eclipse.e4.ui.internal.workbench.swt.AbstractPartRenderer

`activate, createWidget, getContext, getContextForParent, getStyleOverride, getUIContainer, removeGui`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### LazyStackRenderer

public LazyStackRenderer()

## Method Details

### init

public void init(IEventBroker eventBroker)

### contextDisposed

public void contextDisposed(IEventBroker eventBroker)

### postProcess

public void postProcess(MUIElement element)

Overrides:
  `postProcess` in class `org.eclipse.e4.ui.internal.workbench.swt.AbstractPartRenderer`

### childRendered

public void childRendered(MElementContainer<MUIElement> parentElement, MUIElement element)

Overrides:
  `childRendered` in class `SWTPartRenderer`

### hideChild

public void hideChild(MElementContainer<MUIElement> parentElement, MUIElement child)

Overrides:
  `hideChild` in class `org.eclipse.e4.ui.internal.workbench.swt.AbstractPartRenderer`

### processContents

public void processContents(MElementContainer<MUIElement> me)

Overrides:
  `processContents` in class `SWTPartRenderer`

### createTab

protected void createTab(MElementContainer<MUIElement> me, MUIElement part)
This method is necessary to allow the parent container to show affordance (i.e. tabs) for child elements -without- creating the actual part

Parameters:
  `me` - The parent model element
  `part` - The child to show the affordance for

### showTab

protected void showTab(MUIElement element)