Class DefaultQuickListItemRenderer
- java.lang.Object
-
- com.hybris.cockpitng.widgets.common.AbstractWidgetComponentRenderer<P,C,D>
-
- com.hybris.cockpitng.widgets.collectionbrowser.mold.impl.common.renderer.AbstractImageComponentRenderer<org.zkoss.zk.ui.HtmlBasedComponent,QuickList,java.lang.Object>
-
- com.hybris.backoffice.widgets.quicklist.renderer.DefaultQuickListItemRenderer
-
- All Implemented Interfaces:
QuickListItemRenderer,NotifyingWidgetComponentRenderer<org.zkoss.zk.ui.HtmlBasedComponent,QuickList,java.lang.Object>,WidgetComponentRenderer<org.zkoss.zk.ui.HtmlBasedComponent,QuickList,java.lang.Object>
public class DefaultQuickListItemRenderer extends AbstractImageComponentRenderer<org.zkoss.zk.ui.HtmlBasedComponent,QuickList,java.lang.Object> implements QuickListItemRenderer
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringATTRIBUTE_CLICKABLE_REMOVE_BUTTONstatic java.lang.StringATTRIBUTE_CLICKABLE_TITLEstatic java.lang.StringATTRIBUTE_KEY_CLICKABLEstatic java.lang.StringPREVIEW_SUFFIX_QUICK_LISTstatic java.lang.StringSCLASS_IMG_PREVIEW_POPUPstatic java.lang.StringSCLASS_REMOVE_BUTTONstatic java.lang.StringSCLASS_YW_QUICK_LIST_TILE_IMGstatic java.lang.StringSCLASS_YW_QUICK_LIST_TILE_SUBTITLEstatic java.lang.StringSCLASS_YW_QUICK_LIST_TILE_SUBTITLE_CONTAINERstatic java.lang.StringSCLASS_YW_QUICK_LIST_TILE_TITLEstatic java.lang.StringSCLASS_YW_QUICK_LIST_TILE_TITLE_ONLY-
Fields inherited from class com.hybris.cockpitng.widgets.collectionbrowser.mold.impl.common.renderer.AbstractImageComponentRenderer
SCLASS_YW_TITLE_ONLY
-
-
Constructor Summary
Constructors Constructor Description DefaultQuickListItemRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidappendDescriptionLabels(java.lang.Object element, org.zkoss.zk.ui.HtmlBasedComponent parent, QuickList configuration, DataType dataType)protected voidappendLabel(java.lang.Object object, org.zkoss.zk.ui.HtmlBasedComponent tile, QuickList configuration)protected voidappendRemoveButton(java.lang.Object object, org.zkoss.zk.ui.HtmlBasedComponent parent, QuickList configuration)protected voidappendThumbnailAndPopupPreview(java.lang.Object object, QuickList configuration, DataType dataType, org.zkoss.zk.ui.HtmlBasedComponent component, WidgetInstanceManager widgetInstanceManager)LabelServicegetLabelService()protected ObjectPreviewgetObjectPreview(QuickList configuration, java.lang.Object object, DataType dataType, WidgetInstanceManager widgetInstanceManager)WidgetRenderingUtilsgetWidgetRenderingUtils()booleanisAllowRemove()booleanisOpenItemHyperlink(org.zkoss.zk.ui.Component component)Checks if givenComponentis a hyperlink opening the current itembooleanisRemoveItemButton(org.zkoss.zk.ui.Component component)Checks if givenComponentis a hyperlink opening the current itemprotected org.zkoss.zul.ImageprepareThumbnail(java.lang.String thumbnailUrl)voidrender(org.zkoss.zk.ui.HtmlBasedComponent parent, QuickList configuration, java.lang.Object element, DataType dataType, WidgetInstanceManager widgetInstanceManager)Renders a component inside parent, representing given data and complying to given ui configuration.voidsetAllowRemove(boolean allowRemove)voidsetLabelService(LabelService labelService)voidsetWidgetRenderingUtils(WidgetRenderingUtils widgetRenderingUtils)-
Methods inherited from class com.hybris.cockpitng.widgets.collectionbrowser.mold.impl.common.renderer.AbstractImageComponentRenderer
appendPopupPreview, appendThumbnailAndPopupPreview, findMimeByExtension, getConfigurationMapping, getDefaultImage, getExtensionsToMime, getObjectPreview, getObjectPreview, getObjectPreviewService, getPreviewPopupSclass, getThumbnailSclass, isDisplayDefaultImage, loadBaseConfiguration, preparePreviewPopup, setDefaultImage, setDisplayDefaultImage, setExtensionsToMime, setObjectPreviewService
-
Methods inherited from class com.hybris.cockpitng.widgets.common.AbstractWidgetComponentRenderer
addRendererListener, fireComponentRendered, fireComponentRendered, fireComponentRendered, removeRendererListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.hybris.cockpitng.widgets.common.WidgetComponentRenderer
render
-
-
-
-
Field Detail
-
SCLASS_YW_QUICK_LIST_TILE_SUBTITLE_CONTAINER
public static final java.lang.String SCLASS_YW_QUICK_LIST_TILE_SUBTITLE_CONTAINER
- See Also:
- Constant Field Values
-
SCLASS_YW_QUICK_LIST_TILE_SUBTITLE
public static final java.lang.String SCLASS_YW_QUICK_LIST_TILE_SUBTITLE
- See Also:
- Constant Field Values
-
SCLASS_YW_QUICK_LIST_TILE_TITLE
public static final java.lang.String SCLASS_YW_QUICK_LIST_TILE_TITLE
- See Also:
- Constant Field Values
-
SCLASS_YW_QUICK_LIST_TILE_TITLE_ONLY
public static final java.lang.String SCLASS_YW_QUICK_LIST_TILE_TITLE_ONLY
- See Also:
- Constant Field Values
-
SCLASS_YW_QUICK_LIST_TILE_IMG
public static final java.lang.String SCLASS_YW_QUICK_LIST_TILE_IMG
- See Also:
- Constant Field Values
-
SCLASS_IMG_PREVIEW_POPUP
public static final java.lang.String SCLASS_IMG_PREVIEW_POPUP
- See Also:
- Constant Field Values
-
SCLASS_REMOVE_BUTTON
public static final java.lang.String SCLASS_REMOVE_BUTTON
- See Also:
- Constant Field Values
-
PREVIEW_SUFFIX_QUICK_LIST
public static final java.lang.String PREVIEW_SUFFIX_QUICK_LIST
- See Also:
- Constant Field Values
-
ATTRIBUTE_KEY_CLICKABLE
public static final java.lang.String ATTRIBUTE_KEY_CLICKABLE
- See Also:
- Constant Field Values
-
ATTRIBUTE_CLICKABLE_TITLE
public static final java.lang.String ATTRIBUTE_CLICKABLE_TITLE
- See Also:
- Constant Field Values
-
ATTRIBUTE_CLICKABLE_REMOVE_BUTTON
public static final java.lang.String ATTRIBUTE_CLICKABLE_REMOVE_BUTTON
- See Also:
- Constant Field Values
-
-
Method Detail
-
render
public void render(org.zkoss.zk.ui.HtmlBasedComponent parent, QuickList configuration, java.lang.Object element, DataType dataType, WidgetInstanceManager widgetInstanceManager)Description copied from interface:WidgetComponentRendererRenders 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.- Specified by:
renderin interfaceWidgetComponentRenderer<org.zkoss.zk.ui.HtmlBasedComponent,QuickList,java.lang.Object>- Parameters:
parent- parent component on which to renderconfiguration- configuration of rendererelement- data to be rendereddataType- meta information about type of data providedwidgetInstanceManager- widget manager in scope of which renderer is used
-
appendRemoveButton
protected void appendRemoveButton(java.lang.Object object, org.zkoss.zk.ui.HtmlBasedComponent parent, QuickList configuration)
-
appendDescriptionLabels
protected void appendDescriptionLabels(java.lang.Object element, org.zkoss.zk.ui.HtmlBasedComponent parent, QuickList configuration, DataType dataType)
-
appendLabel
protected void appendLabel(java.lang.Object object, org.zkoss.zk.ui.HtmlBasedComponent tile, QuickList configuration)
-
appendThumbnailAndPopupPreview
protected void appendThumbnailAndPopupPreview(java.lang.Object object, QuickList configuration, DataType dataType, org.zkoss.zk.ui.HtmlBasedComponent component, WidgetInstanceManager widgetInstanceManager)
-
getObjectPreview
protected ObjectPreview getObjectPreview(QuickList configuration, java.lang.Object object, DataType dataType, WidgetInstanceManager widgetInstanceManager)
- Overrides:
getObjectPreviewin classAbstractImageComponentRenderer<org.zkoss.zk.ui.HtmlBasedComponent,QuickList,java.lang.Object>
-
prepareThumbnail
protected org.zkoss.zul.Image prepareThumbnail(java.lang.String thumbnailUrl)
- Overrides:
prepareThumbnailin classAbstractImageComponentRenderer<org.zkoss.zk.ui.HtmlBasedComponent,QuickList,java.lang.Object>
-
getLabelService
public LabelService getLabelService()
-
setLabelService
public void setLabelService(LabelService labelService)
-
getWidgetRenderingUtils
public WidgetRenderingUtils getWidgetRenderingUtils()
-
setWidgetRenderingUtils
public void setWidgetRenderingUtils(WidgetRenderingUtils widgetRenderingUtils)
-
isOpenItemHyperlink
public boolean isOpenItemHyperlink(org.zkoss.zk.ui.Component component)
Description copied from interface:QuickListItemRendererChecks if givenComponentis a hyperlink opening the current item- Specified by:
isOpenItemHyperlinkin interfaceQuickListItemRenderer- Parameters:
component- ui component- Returns:
- true if is open hyperlink
-
isRemoveItemButton
public boolean isRemoveItemButton(org.zkoss.zk.ui.Component component)
Description copied from interface:QuickListItemRendererChecks if givenComponentis a hyperlink opening the current item- Specified by:
isRemoveItemButtonin interfaceQuickListItemRenderer- Parameters:
component- ui component- Returns:
- true if is remove item
-
isAllowRemove
public boolean isAllowRemove()
-
setAllowRemove
public void setAllowRemove(boolean allowRemove)
-
-