Class WidgetComponentRendererEvent<P,​C,​D>


  • public class WidgetComponentRendererEvent<P,​C,​D>
    extends java.lang.Object
    Event describing rendering some component
    • Constructor Detail

      • WidgetComponentRendererEvent

        public WidgetComponentRendererEvent​(org.zkoss.zk.ui.Component source,
                                            NotifyingWidgetComponentRenderer<P,​C,​D> renderer)
        Parameters:
        source - component that has been rendered
        renderer - 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 rendered
        config - renderer configuration
        data - data being rendered
      • getSource

        public org.zkoss.zk.ui.Component getSource()
        Returns:
        component that has been rendered
      • 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
      • isFinal

        public boolean isFinal()
        Checks whether this is final event of rendering. An event is considered to be final, if no other events concerning getParent() will be triggered. Also getParent() may be considered as fully rendered.
        Returns:
        true if rendering has been finished