Class CollectionGridDataSource

    • Constructor Summary

      Constructors 
      Constructor Description
      CollectionGridDataSource​(java.util.Collection collection)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getAvailableRows()
      Returns the number of rows available in the data source.
      java.lang.Class getRowType()
      Returns the type of the first element in the list, or null if the list is empty.
      java.lang.Object getRowValue​(int index)
      Returns the row value at the provided index.
      boolean isEmpty()
      Return whether the data source is empty, i.e.
      void prepare​(int startIndex, int endIndex, java.util.List<SortConstraint> sortConstraints)
      Invoked to allow the source to prepare to present values.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • isEmpty

        public boolean isEmpty()
        Description copied from interface: GridDataSource
        Return whether the data source is empty, i.e. does not have any rows available.
        Specified by:
        isEmpty in interface GridDataSource
      • prepare

        public void prepare​(int startIndex,
                            int endIndex,
                            java.util.List<SortConstraint> sortConstraints)
        Description copied from interface: GridDataSource
        Invoked to allow the source to prepare to present values. This gives the source a chance to pre-fetch data (when appropriate) and informs the source of the desired sort order. Sorting comes first, then extraction by range.
        Specified by:
        prepare in interface GridDataSource
        Parameters:
        startIndex - the starting index to be retrieved
        endIndex - the ending index to be retrieved
        sortConstraints - identify how data is to be sorted
      • getRowType

        public java.lang.Class getRowType()
        Returns the type of the first element in the list, or null if the list is empty.
        Specified by:
        getRowType in interface GridDataSource
        Returns:
        the row type, or null