Package totalcross.ui

Interface Grid.DataSource

  • Enclosing class:
    Grid

    public static interface Grid.DataSource
    Interface that can be used to fetch data on demmand. This makes the grid slower but uses much less memory. Here's a sample:
       public String[][] getItems(int startIndex, int count)
       {
          if (activeRS != null)
          {
             activeRS.absolute(startIndex);
             return activeRS.getStrings(count);
          }
          return null;
       }
     
    See Also:
    Grid.lastStartingRow
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String[][] getItems​(int startingRow, int count)
      Must return a matrix of items that will be displayed at the grid.
    • Method Detail

      • getItems

        java.lang.String[][] getItems​(int startingRow,
                                      int count)
        Must return a matrix of items that will be displayed at the grid.