Class GridView

    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlBasedComponent

        org.zkoss.zk.ui.HtmlBasedComponent.ExtraCtrl
      • Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent

        org.zkoss.zk.ui.AbstractComponent.Children
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DEFAULT_GRIDVIEW_CONF  
      protected org.zkoss.zul.Checkbox focusComponent  
      protected boolean initialized  
      static java.lang.String ITEM_BOX_SIZE  
      protected org.zkoss.zul.Div mainDiv  
      protected MutableListModel model  
      • Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent

        _zclass
      • Fields inherited from interface org.zkoss.zk.ui.Component

        APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
      • Fields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl

        AFTER_CHILD_ADDED, AFTER_CHILD_REMOVED, AFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED, CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE
    • Constructor Summary

      Constructors 
      Constructor Description
      GridView()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addGridViewListener​(GridViewListener listener)  
      protected void appendScrollIntoViewComponent​(org.zkoss.zk.ui.HtmlBasedComponent cell)  
      protected void continueRenderItems​(org.zkoss.zk.ui.Component parent, int index)  
      protected void continueRenderItems​(org.zkoss.zk.ui.Component parent, int index, int numberOfItemsToRender)  
      protected org.zkoss.zk.ui.HtmlBasedComponent createItemBox​(TypedObject item, GridViewConfiguration config)  
      protected void doUserEvent​(java.lang.Object[] data)  
      protected void fireChangeSelection​(int selectedIndex)  
      protected void fireChangeSelection​(java.util.List<java.lang.Integer> selectedIndexes)  
      protected void fireRemove​(java.util.Collection<java.lang.Integer> indexes)  
      protected void focusFocusComponent()  
      java.lang.String getConfigContextCode()  
      GridItemRenderer getGridItemRenderer()  
      protected TypedObject getItemAt​(int index)  
      MutableListModel getModel()  
      TypeService getTypeService()  
      protected UIConfigurationService getUIConfigurationService()  
      boolean initialize()
      Initializes this view component.
      protected void rangeSelect​(int index)  
      void removeGridViewListener​(GridViewListener listener)  
      protected void removeSelectedItems()  
      protected void renderActivation​(boolean selected)  
      protected void renderItemAsActive​(org.zkoss.zk.ui.HtmlBasedComponent comp, boolean active)  
      protected void renderItemAsSelected​(org.zkoss.zk.ui.HtmlBasedComponent comp, boolean selected)  
      protected void renderItems​(org.zkoss.zk.ui.Component parent)  
      protected void renderSelection​(boolean selected)  
      protected void rerenderItem​(TypedObject item)  
      void setConfigContextCode​(java.lang.String code)  
      void setGridItemRenderer​(GridItemRenderer gridItemRenderer)  
      void setModel​(MutableListModel model)  
      void setRootType​(ObjectTemplate template)  
      boolean update()
      Updates this view component completely.
      void updateActivation()
      Called whenever the activation needs to be updated i.e.
      void updateActiveItems()
      Called whenever the currently active items need to be re-rendered.
      int updateItem​(TypedObject item, java.util.Set<PropertyDescriptor> propertyDescriptors)
      try to update rows containing the specified items
      void updateItems()
      Called whenever the items have changed in some way e.g.
      void updateSelection()
      Called whenever the selection is changed in some way and the view needs to update itself accordingly.
      • Methods inherited from class org.zkoss.zul.Div

        getAlign, renderProperties, setAlign
      • Methods inherited from class org.zkoss.zul.impl.XulElement

        clone, getContext, getCtrlKeys, getPopup, getPropertyAccess, getTooltip, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributes
      • Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent

        focus, getAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZindex, getZIndex, service, setAction, setClass, setDraggable, setDroppable, setFocus, setHeight, setHeight0, setHeightDirectly, setHflex, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectly
      • Methods inherited from class org.zkoss.zk.ui.AbstractComponent

        addAnnotation, addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, enableBindingAnnotation, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getCallback, getChildren, getClientAttribute, getClientDataAttribute, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, insertBefore, invalidate, isChildable, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
      • Methods inherited from class java.lang.Object

        finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.zkoss.zk.ui.Component

        addEventListener, addEventListener, addForward, addForward, addForward, addForward, appendChild, applyProperties, clone, detach, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getChildren, getClientAttribute, getClientDataAttribute, getDefinition, getDesktop, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getShadowVariable, getShadowVariable, getSpaceOwner, getStubonly, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttributeOrFellow, hasFellow, hasFellow, insertBefore, invalidate, isInvalidated, isListenerAvailable, isVisible, query, queryAll, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setTemplate, setVisible, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride
      • Methods inherited from interface org.zkoss.zk.ui.api.HtmlBasedComponent

        focus, getHeight, getLeft, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZclass, getZindex, getZIndex, setDraggable, setDroppable, setFocus, setHeight, setLeft, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZclass, setZindex, setZIndex
      • Methods inherited from interface org.zkoss.zk.ui.ext.Scope

        addScopeListener, getAttribute, hasAttribute, removeAttribute, removeScopeListener, setAttribute
    • Field Detail

      • DEFAULT_GRIDVIEW_CONF

        public static final java.lang.String DEFAULT_GRIDVIEW_CONF
        See Also:
        Constant Field Values
      • initialized

        protected boolean initialized
      • mainDiv

        protected org.zkoss.zul.Div mainDiv
      • focusComponent

        protected org.zkoss.zul.Checkbox focusComponent
    • Constructor Detail

      • GridView

        public GridView()
    • Method Detail

      • getConfigContextCode

        public java.lang.String getConfigContextCode()
      • updateActivation

        public void updateActivation()
        Description copied from interface: UIItemView
        Called whenever the activation needs to be updated i.e. which items are currently rendered as "active".

        Note: Does not re-render the items themselves, only the activation state of them. In order to update the items use UIItemView.updateActiveItems().

        Specified by:
        updateActivation in interface UIItemView
      • rerenderItem

        protected void rerenderItem​(TypedObject item)
      • updateItem

        public int updateItem​(TypedObject item,
                              java.util.Set<PropertyDescriptor> propertyDescriptors)
        Description copied from interface: UIItemView
        try to update rows containing the specified items
        Specified by:
        updateItem in interface UIItemView
        Parameters:
        item - the item
        propertyDescriptors - modified properties
        Returns:
        the number of updated rows
      • renderItemAsSelected

        protected void renderItemAsSelected​(org.zkoss.zk.ui.HtmlBasedComponent comp,
                                            boolean selected)
      • renderItemAsActive

        protected void renderItemAsActive​(org.zkoss.zk.ui.HtmlBasedComponent comp,
                                          boolean active)
      • renderSelection

        protected void renderSelection​(boolean selected)
      • renderActivation

        protected void renderActivation​(boolean selected)
      • appendScrollIntoViewComponent

        protected void appendScrollIntoViewComponent​(org.zkoss.zk.ui.HtmlBasedComponent cell)
      • updateSelection

        public void updateSelection()
        Description copied from interface: UIItemView
        Called whenever the selection is changed in some way and the view needs to update itself accordingly.
        Specified by:
        updateSelection in interface UIItemView
      • initialize

        public boolean initialize()
        Description copied from interface: UIViewComponent
        Initializes this view component.

        Note: Should not be called during object creation i.e. from constructor.

        Specified by:
        initialize in interface UIViewComponent
        Returns:
        true if initialize was successful, false otherwise
      • update

        public boolean update()
        Description copied from interface: UIViewComponent
        Updates this view component completely.
        Specified by:
        update in interface UIViewComponent
        Returns:
        true if update was successful, false otherwise
      • updateItems

        public void updateItems()
        Description copied from interface: UIItemView
        Called whenever the items have changed in some way e.g. an item has been added or removed.
        Specified by:
        updateItems in interface UIItemView
      • focusFocusComponent

        protected void focusFocusComponent()
      • renderItems

        protected void renderItems​(org.zkoss.zk.ui.Component parent)
      • continueRenderItems

        protected void continueRenderItems​(org.zkoss.zk.ui.Component parent,
                                           int index)
      • continueRenderItems

        protected void continueRenderItems​(org.zkoss.zk.ui.Component parent,
                                           int index,
                                           int numberOfItemsToRender)
      • rangeSelect

        protected void rangeSelect​(int index)
      • getItemAt

        protected TypedObject getItemAt​(int index)
      • removeSelectedItems

        protected void removeSelectedItems()
      • fireRemove

        protected void fireRemove​(java.util.Collection<java.lang.Integer> indexes)
      • fireChangeSelection

        protected void fireChangeSelection​(java.util.List<java.lang.Integer> selectedIndexes)
      • fireChangeSelection

        protected void fireChangeSelection​(int selectedIndex)
      • doUserEvent

        protected void doUserEvent​(java.lang.Object[] data)