Class WidgetComponentRendererEvent<P,C,D>
- java.lang.Object
-
- com.hybris.cockpitng.widgets.common.WidgetComponentRendererEvent<P,C,D>
-
public class WidgetComponentRendererEvent<P,C,D> extends java.lang.ObjectEvent describing rendering some component
-
-
Constructor Summary
Constructors Constructor Description WidgetComponentRendererEvent(org.zkoss.zk.ui.Component source, NotifyingWidgetComponentRenderer<P,C,D> renderer)WidgetComponentRendererEvent(org.zkoss.zk.ui.Component source, WidgetComponentRenderer<P,C,D> renderer)Deprecated, for removal: This API element is subject to removal in a future version.since 6.5
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WidgetComponentRendererEvent<?,?,?>getCause()Gets rendering parameters of specific nested renderer.<PP,CC,DD>
WidgetComponentRendererEvent<PP,CC,DD>getCause(java.lang.Class<? extends CC> configClass)Gets rendering parameters of specific nested renderer that was rendering configuration of specified type.<PP,CC,DD>
WidgetComponentRendererEvent<PP,CC,DD>getCause(java.util.function.Predicate<WidgetComponentRendererEvent> condition)Gets rendering parameters of specific nested renderer that meets specified conditions.CgetConfig()DgetData()PgetParent()NotifyingWidgetComponentRenderer<P,C,D>getRenderer()org.zkoss.zk.ui.ComponentgetSource()protected voidinitCause(WidgetComponentRendererEvent<?,?,?> cause)booleanisFinal()Checks whether this is final event of rendering.voidsetEventData(P parent, C config, D data)Sets information kept by event
-
-
-
Constructor Detail
-
WidgetComponentRendererEvent
@Deprecated(since="6.5", forRemoval=true) public WidgetComponentRendererEvent(org.zkoss.zk.ui.Component source, WidgetComponentRenderer<P,C,D> renderer)Deprecated, for removal: This API element is subject to removal in a future version.since 6.5- Parameters:
source- component that has been renderedrenderer- renderer that rendered the component- See Also:
WidgetComponentRendererEvent(Component, NotifyingWidgetComponentRenderer)
-
WidgetComponentRendererEvent
public WidgetComponentRendererEvent(org.zkoss.zk.ui.Component source, NotifyingWidgetComponentRenderer<P,C,D> renderer)- Parameters:
source- component that has been renderedrenderer- renderer that rendered the component
-
-
Method Detail
-
setEventData
public void setEventData(P parent, C config, D data)
Sets information kept by event- Parameters:
parent- container which children are being renderedconfig- renderer configurationdata- data being rendered
-
getSource
public org.zkoss.zk.ui.Component getSource()
- Returns:
- component that has been rendered
-
initCause
protected void initCause(WidgetComponentRendererEvent<?,?,?> cause)
-
getCause
public WidgetComponentRendererEvent<?,?,?> getCause()
Gets rendering parameters of specific nested renderer.Helpful when nested rendering is used (i.e. EditorAreaRenderer uses TabRenderer). In such situation it is possible that all listeners of parent renderer (i.e. EditorArea's) wishes to be notified of rendering events of nested renderer (i.e. TabRenderer). If any events are posted by wrapped renderer, then they are passed over to parent renderer.
Parent listeners that are notified of nested rendering events gets information about particular component that has been rendered and parent's configuration/data.
- Returns:
- nested renderer's event
-
getCause
public <PP,CC,DD> WidgetComponentRendererEvent<PP,CC,DD> getCause(java.lang.Class<? extends CC> configClass)
Gets rendering parameters of specific nested renderer that was rendering configuration of specified type.Helpful when nested rendering is used (i.e. EditorAreaRenderer uses TabRenderer). In such situation it is possible that all listeners of parent renderer (i.e. EditorArea's) wishes to be notified of rendering events of nested renderer (i.e. TabRenderer). If any events are posted by wrapped renderer, then they are passed over to parent renderer.
Parent listeners that are notified of nested rendering events gets information about particular component that has been rendered and parent's configuration/data.
- Parameters:
configClass- class of a configuration which rendering event is to be found- Returns:
- nested renderer's event
-
getCause
public <PP,CC,DD> WidgetComponentRendererEvent<PP,CC,DD> getCause(java.util.function.Predicate<WidgetComponentRendererEvent> condition)
Gets rendering parameters of specific nested renderer that meets specified conditions.Helpful when nested rendering is used (i.e. EditorAreaRenderer uses TabRenderer). In such situation it is possible that all listeners of parent renderer (i.e. EditorArea's) wishes to be notified of rendering events of nested renderer (i.e. TabRenderer). If any events are posted by wrapped renderer, then they are passed over to parent renderer.
Parent listeners that are notified of nested rendering events gets information about particular component that has been rendered and parent's configuration/data.
- Parameters:
condition- condition that event needs to meet- Returns:
- nested renderer's event
-
getParent
public P getParent()
- Returns:
- container which children are being rendered
-
getConfig
public C getConfig()
- Returns:
- renderer configuration
-
getData
public D getData()
- Returns:
- data being rendered
-
getRenderer
public NotifyingWidgetComponentRenderer<P,C,D> getRenderer()
- Returns:
- renderer which fired event
-
isFinal
public boolean isFinal()
Checks whether this is final event of rendering. An event is considered to be final, if no other events concerninggetParent()will be triggered. AlsogetParent()may be considered as fully rendered.- Returns:
trueif rendering has been finished
-
-