com.tekann.codegen.pda.db
Class MatrixDataSource

java.lang.Object
  extended by com.tekann.codegen.pda.db.MatrixDataSource
All Implemented Interfaces:
totalcross.ui.Grid.DataSource
Direct Known Subclasses:
ColumnFormatterDataSource, MatrixDataSourceFormatDateValue

public class MatrixDataSource
extends java.lang.Object
implements totalcross.ui.Grid.DataSource

This class provides some useful methods in order to display and manipulate data at the grid.
See totalcross.ui.Grid.DataSource for more detail

Author:
evandro

Field Summary
 int totalColumns
          Total columns of the grid.
 
Constructor Summary
MatrixDataSource(int[] visibleColumns, int[] pkColumns)
          Constructs a new MatrixDataSource
MatrixDataSource(int[] visibleColumns, int[] pkColumns, java.lang.String[][] data, int totalColumns)
          Constructs a new MatrixDataSource
 
Method Summary
 java.lang.String[][] getData()
          Getter for data
 java.lang.String[][] getItems(int startingRow, int count)
           
 java.lang.String[] getPksFromRow(int row)
          Get the primary key values
 int getTop()
          Getter for top
 int getTotalItens()
          Get the number of items
 void setData(java.lang.String[][] data)
          Setter fir data
 void setTop(int top)
          Setter for top
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

totalColumns

public int totalColumns
Total columns of the grid.

Constructor Detail

MatrixDataSource

public MatrixDataSource(int[] visibleColumns,
                        int[] pkColumns,
                        java.lang.String[][] data,
                        int totalColumns)
Constructs a new MatrixDataSource

Parameters:
visibleColumns - The visible columns indices
pkColumns - The primary key indices
data - The data
totalColumns - The number of columns

MatrixDataSource

public MatrixDataSource(int[] visibleColumns,
                        int[] pkColumns)
Constructs a new MatrixDataSource

Parameters:
visibleColumns - The visible columns indices
pkColumns - The primary key indices
Method Detail

getData

public java.lang.String[][] getData()
Getter for data

Returns:
A String array

setData

public void setData(java.lang.String[][] data)
Setter fir data

Parameters:
data -

getTop

public int getTop()
Getter for top

Returns:
An integer

setTop

public void setTop(int top)
Setter for top

Parameters:
top -

getItems

public java.lang.String[][] getItems(int startingRow,
                                     int count)
Specified by:
getItems in interface totalcross.ui.Grid.DataSource

getPksFromRow

public java.lang.String[] getPksFromRow(int row)
Get the primary key values

Parameters:
row -
Returns:
A String array

getTotalItens

public int getTotalItens()
Get the number of items

Returns:
An integer