Class ListGridRow
java.lang.Object
com.jbstrap.ui.components.listgrid.ListGridRow
Class representing a
ListGrid
row.- Since:
- 4.0
- Author:
- JBStrap
-
Constructor Summary
ModifierConstructorDescriptionprotected
ListGridRow
(ListGrid parentGrid, List<ListGridColumn> columns, Record record) -
Method Summary
Modifier and TypeMethodDescriptionprotected com.jbstrap.ui.components.listgrid.ListGridCell
getCellByName
(String columnName) protected List<com.jbstrap.ui.components.listgrid.ListGridCell>
getCells()
protected Object
getCellValue
(String columnName) protected String
Gets the original record in the list grid row.Gets the record in the list grid row.int
Gets the list grid row index.getState()
Gets the state of the list grid row record.Sets the list grid row record.protected ListGridRow
setRowIndex
(int rowIndex) protected final ListGridRow
setState
(ListGridRecordState state) Sets the list grid row cell value.
-
Constructor Details
-
ListGridRow
- Parameters:
parentGrid
- The parent list grid component ionstancecolumns
- A collection of columns in the list grid rowrecord
- The record used to populate the list grid row- Throws:
NullPointerException
- Thrown if the collection isnull
-
-
Method Details
-
setRecord
Sets the list grid row record. If the specified record is different from the ones in the list grid row, data in the list grid row are updated.- Parameters:
record
- The record to be added to the row List grid data is updated using the record here specified.- Returns:
- List grid row
-
getRecord
Gets the record in the list grid row.- Returns:
- An instance of the list grid row or
null
if there is no record n the list grid row
-
getOriginalRecord
Gets the original record in the list grid row. The row was initialized using this record.- Returns:
- The initial record in the list grid row or
null
if there were no records in the list grid row
-
getState
Gets the state of the list grid row record.- Returns:
- List grid row record state
- See Also:
-
setRowIndex
- Parameters:
rowIndex
- The row index- Returns:
- The list grid row
-
getRowIndex
public int getRowIndex()Gets the list grid row index.- Returns:
- List grid row index or -1 if index is not determined
-
setValue
Sets the list grid row cell value.- Parameters:
columnName
- Column name whose value is to be setvalue
- The value to be set- Returns:
- List grid row
-
setState
- Parameters:
state
- List grid row record state Available states are listed in the enumListGridRecordState
.- Returns:
- List grid row
-
getCellValue
- Parameters:
columnName
- Column name containing the value- Returns:
- Value in the specified cell
If there is no cell in the list grid row by the specified name,
null
is returned. If the specified cell is a rendered cell, the cell’s component is returned. If the cell is not a rendered one, the displayed text value is returned.
-
getCellByName
- Parameters:
columnName
- Column name of the cell component- Returns:
- Cell component for the specified row or
null
if the specified column does not exist in the list grid row
-
getCells
- Returns:
- The list grid cells or empty list if not any cells in the row
-
getJsonData
-
selectRow
-
deselectRow
-