| org.drools.brms.client.table.SortableTable
SortableTable | public class SortableTable extends Grid implements TableListener(Code) | | A sortable table widget. Extends the GWT Grid widget.
(more performant then FlexTable).
|
Constructor Summary | |
public | SortableTable(int rows, int cols) Create a sortable table widget, of the specified proportions.
The number of rows does NOT include the header. |
Method Summary | |
public static SortableTable | createTableWidget(DataModel data, String[] header, int fillRows, boolean hasIcons) This will return a sortable table ready to go. | protected void | drawTable() | public String | getBlankImage() | public int | getRowNumbers() | public String | getSelectedKey() This will return the key of the selected row. | public int | getSelectedRow() | public String | getSortAscImage() | public String | getSortDescImage() | public void | onCellClicked(SourcesTableEvents sender, int row, int col) When a cell is clicked, the selected row is styled, and
the currently selected row is remembered. | public void | setBlankImage(String blankImage) | public void | setColumnHeader(String name, int index) Adds a header, which will be at the zero index in the table. | public void | setHiddenColumn(int colIndex) This can be used to ensure that a column is invisible.
This will also include the header (first row)
You would use this to allow a "key" column to be stored with the data.
For example, a UUID for a rule. | public void | setRowNumbers(int rowNumbers) | public void | setSortAscImage(String sortAscImage) | public void | setSortDescImgage(String sortDescImgage) | public void | setValue(int row, int col, Comparable val, Widget w) This will store the value in the x,y position. | public void | sort(int columnIndex) |
styleListHeader | public static String styleListHeader(Code) | | The stylez
|
SortableTable | public SortableTable(int rows, int cols)(Code) | | Create a sortable table widget, of the specified proportions.
The number of rows does NOT include the header.
|
createTableWidget | public static SortableTable createTableWidget(DataModel data, String[] header, int fillRows, boolean hasIcons)(Code) | | This will return a sortable table ready to go.
Parameters: rows - The data. Parameters: header - Headers. Parameters: fillRows - The number of rows to pad out, if needed Parameters: hasIcons - A SortableTable ready to go ! |
drawTable | protected void drawTable()(Code) | | |
getRowNumbers | public int getRowNumbers()(Code) | | |
getSelectedKey | public String getSelectedKey()(Code) | | This will return the key of the selected row.
|
getSelectedRow | public int getSelectedRow()(Code) | | The selected row index. |
onCellClicked | public void onCellClicked(SourcesTableEvents sender, int row, int col)(Code) | | When a cell is clicked, the selected row is styled, and
the currently selected row is remembered.
If it was in-fact a header that was clicked, then it will sort the
data and redisplay the grid.
|
setBlankImage | public void setBlankImage(String blankImage)(Code) | | |
setColumnHeader | public void setColumnHeader(String name, int index)(Code) | | Adds a header, which will be at the zero index in the table.
|
setHiddenColumn | public void setHiddenColumn(int colIndex)(Code) | | This can be used to ensure that a column is invisible.
This will also include the header (first row)
You would use this to allow a "key" column to be stored with the data.
For example, a UUID for a rule.
|
setRowNumbers | public void setRowNumbers(int rowNumbers)(Code) | | |
setSortAscImage | public void setSortAscImage(String sortAscImage)(Code) | | |
setSortDescImgage | public void setSortDescImgage(String sortDescImgage)(Code) | | |
setValue | public void setValue(int row, int col, Comparable val, Widget w)(Code) | | This will store the value in the x,y position.
Values must be comparable for sorting to work of course.
Start with a row index of 1 otherwise as zero means header.
|
sort | public void sort(int columnIndex)(Code) | | This performs the sorting
|
|
|