Class SimpleListModel

  • All Implemented Interfaces:
    Serializable, org.zkoss.zul.ext.Pageable, org.zkoss.zul.ext.Selectable<Object>, org.zkoss.zul.ext.Sortable<Object>, org.zkoss.zul.ListitemRenderer<Object>, org.zkoss.zul.ListitemRendererExt, org.zkoss.zul.ListModel<Object>, org.zkoss.zul.PageableModel

    public class SimpleListModel
    extends org.zkoss.zul.AbstractListModel<Object>
    implements org.zkoss.zul.ListitemRenderer<Object>, org.zkoss.zul.ListitemRendererExt, org.zkoss.zul.ext.Sortable<Object>
    Author:
    Low Heng Sin
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.zkoss.zul.AbstractListModel

        org.zkoss.zul.AbstractListModel.DefaultSelectionControl<E extends Object>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected List<Object> list  
      • Fields inherited from class org.zkoss.zul.AbstractListModel

        _selection
      • Fields inherited from interface org.zkoss.zul.ListitemRendererExt

        DETACH_ON_RENDER
      • Fields inherited from interface org.zkoss.zul.PageableModel

        INTERNAL_EVENT
    • Constructor Detail

      • SimpleListModel

        public SimpleListModel()
      • SimpleListModel

        public SimpleListModel​(List<?> list)
    • Method Detail

      • getElementAt

        public Object getElementAt​(int index)
        Specified by:
        getElementAt in interface org.zkoss.zul.ListModel<Object>
      • getSize

        public int getSize()
        Specified by:
        getSize in interface org.zkoss.zul.ListModel<Object>
      • render

        public void render​(org.zkoss.zul.Listitem item,
                           Object data,
                           int index)
                    throws Exception
        Specified by:
        render in interface org.zkoss.zul.ListitemRenderer<Object>
        Throws:
        Exception
      • renderCell

        protected void renderCell​(int col,
                                  org.zkoss.zul.Listitem item,
                                  String value)
      • getControls

        public int getControls()
        Specified by:
        getControls in interface org.zkoss.zul.ListitemRendererExt
      • newListcell

        public org.zkoss.zul.Listcell newListcell​(org.zkoss.zul.Listitem item)
        Specified by:
        newListcell in interface org.zkoss.zul.ListitemRendererExt
      • newListitem

        public org.zkoss.zul.Listitem newListitem​(org.zkoss.zul.Listbox listbox)
        Specified by:
        newListitem in interface org.zkoss.zul.ListitemRendererExt
      • setMaxLength

        public void setMaxLength​(int[] maxLength)
      • addElement

        public void addElement​(Object obj)
      • add

        public void add​(int index,
                        Object obj)
      • removeAllElements

        public void removeAllElements()
      • removeElement

        public void removeElement​(Object element)
      • setElementAt

        public void setElementAt​(Object element,
                                 int index)
      • indexOf

        public int indexOf​(Object value)
      • sort

        public void sort​(Comparator<Object> cmpr,
                         boolean ascending)
        Specified by:
        sort in interface org.zkoss.zul.ext.Sortable<Object>
      • getSortDirection

        public String getSortDirection​(Comparator<Object> cmpr)
        Specified by:
        getSortDirection in interface org.zkoss.zul.ext.Sortable<Object>