Class AbstractSummaryViewItemWithIconRenderer<DATA>

    • Constructor Detail

      • AbstractSummaryViewItemWithIconRenderer

        public AbstractSummaryViewItemWithIconRenderer()
    • Method Detail

      • render

        public void render​(org.zkoss.zk.ui.Component parent,
                           Attribute attributeConfiguration,
                           DATA data,
                           DataType dataType,
                           WidgetInstanceManager widgetInstanceManager)
        Description copied from interface: WidgetComponentRenderer
        Renders a component inside parent, representing given data and complying to given ui configuration. The data should be of give dataType. The renderer implementation could communicate with underlying widget via widgetInstanceManager.
        Parameters:
        parent - parent component on which to render
        attributeConfiguration - configuration of renderer
        data - data to be rendered
        dataType - meta information about type of data provided
        widgetInstanceManager - widget manager in scope of which renderer is used
      • createContainer

        protected org.zkoss.zk.ui.HtmlBasedComponent createContainer​(org.zkoss.zk.ui.Component parent,
                                                                     Attribute attributeConfiguration,
                                                                     DATA data,
                                                                     DataType dataType,
                                                                     WidgetInstanceManager widgetInstanceManager)
      • canHandle

        protected boolean canHandle​(DATA data,
                                    DataType dataType)
        Check whether renderer supports given data
        Parameters:
        data - data
        dataType - type of data
        Returns:
        true if given data is supported
      • hasPermission

        protected boolean hasPermission​(DATA data,
                                        DataType dataType)
        Check whether there are enough permissions for a renderer to render an attribute. By default it checks whether given object's type and given instance can be read.
        Parameters:
        data - data
        dataType - type of data
        Returns:
        true if renderer can access given data and given typeCode.
      • hasAttributePermission

        protected boolean hasAttributePermission​(DATA data,
                                                 DataAttribute dataAttribute)
        Check whether there are enough permissions for a renderer to render an attribute. By default it checks whether property of given given object and data attribute can be read.
        Parameters:
        data - data
        dataAttribute - attribute of data
        Returns:
        true if renderer can access property of data for a given dataAttribute.
      • getIconStatusSClass

        protected abstract java.lang.String getIconStatusSClass​(org.zkoss.zk.ui.HtmlBasedComponent iconContainer,
                                                                Attribute attributeConfiguration,
                                                                DATA data,
                                                                DataAttribute dataAttribute,
                                                                DataType dataType,
                                                                WidgetInstanceManager widgetInstanceManager)
        Use SCLASS_PATTERN_ICON as a template for building icon's css class name such as yw-summaryview-online-status-Online.
        Parameters:
        iconContainer - component that will be marked with returned class
        attributeConfiguration - configuration of rendering
        data - data
        dataAttribute - attribute to be rendered
        dataType - type code of data
        widgetInstanceManager - instance manager of widget on which rendering takes place
        Returns:
        css class which is added to each item's icon container
        See Also:
        getIconStatusSClass(String, String)
      • renderValue

        protected abstract void renderValue​(org.zkoss.zul.Div attributeContainer,
                                            Attribute attributeConfiguration,
                                            DATA data,
                                            DataAttribute dataAttribute,
                                            DataType dataType,
                                            WidgetInstanceManager widgetInstanceManager)
        Used by render(Component, Attribute, Object, DataType, WidgetInstanceManager) method for obtaining attribute representation.
        Parameters:
        attributeContainer - attribute representation can be appended to this container
        attributeConfiguration - configuration of rendering
        data - data
        dataAttribute - attribute to be rendered
        dataType - type code of data
        widgetInstanceManager - widget instance manager
      • renderInvalidDataLabel

        protected void renderInvalidDataLabel​(org.zkoss.zk.ui.Component parent,
                                              WidgetInstanceManager widgetInstanceManager)
      • renderNoReadAccess

        protected void renderNoReadAccess​(org.zkoss.zk.ui.Component parent,
                                          DATA data)
      • getLabelService

        protected LabelService getLabelService()
      • setLabelService

        public void setLabelService​(LabelService labelService)
      • setPermissionFacade

        public void setPermissionFacade​(PermissionFacade permissionFacade)
      • setAttributeLabelResolver

        public void setAttributeLabelResolver​(AttributeLabelResolver attributeLabelResolver)