Package org.compiere.report.core
Class ResultTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- org.compiere.report.core.ResultTableModel
-
- All Implemented Interfaces:
Serializable
,TableModel
public class ResultTableModel extends AbstractTableModel
The TableModel for JTable to present RModel information- Version:
- $Id: ResultTableModel.java,v 1.2 2006/07/30 00:51:06 jjanke Exp $
- Author:
- Jorg Janke
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
-
Constructor Summary
Constructors Constructor Description ResultTableModel(RModel reportModel)
Create a JTable Model from ReportModel
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<?>
getColumnClass(int columnIndex)
Get Column Classint
getColumnCount()
Get ColumnCountString
getColumnName(int columnIndex)
Get Column Nameprotected ArrayList<ArrayList<Object>>
getDataList()
Returns the ArrayList of ArrayLists that contains the table's data values.int
getRowCount()
Get Row CountObject
getValueAt(int row, int col)
Get Value Atboolean
isCellEditable(int rowIndex, int columnIndex)
Is Cell Editablevoid
moveRow(int from, int to)
Move Rowvoid
setValueAt(Object aValue, int row, int col)
Set Value At-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
-
-
-
Constructor Detail
-
ResultTableModel
public ResultTableModel(RModel reportModel)
Create a JTable Model from ReportModel- Parameters:
reportModel
-
-
-
Method Detail
-
getRowCount
public int getRowCount()
Get Row Count- Returns:
- row count
-
getColumnCount
public int getColumnCount()
Get ColumnCount- Returns:
- column count
-
getColumnName
public String getColumnName(int columnIndex)
Get Column Name- Specified by:
getColumnName
in interfaceTableModel
- Overrides:
getColumnName
in classAbstractTableModel
- Parameters:
columnIndex
-- Returns:
- Column Name
-
getColumnClass
public Class<?> getColumnClass(int columnIndex)
Get Column Class- Specified by:
getColumnClass
in interfaceTableModel
- Overrides:
getColumnClass
in classAbstractTableModel
- Parameters:
columnIndex
-- Returns:
- Column Class
-
isCellEditable
public boolean isCellEditable(int rowIndex, int columnIndex)
Is Cell Editable- Specified by:
isCellEditable
in interfaceTableModel
- Overrides:
isCellEditable
in classAbstractTableModel
- Parameters:
rowIndex
-columnIndex
-- Returns:
- true, if editable
-
getValueAt
public Object getValueAt(int row, int col)
Get Value At- Parameters:
row
-col
-- Returns:
- value
-
setValueAt
public void setValueAt(Object aValue, int row, int col)
Set Value At- Specified by:
setValueAt
in interfaceTableModel
- Overrides:
setValueAt
in classAbstractTableModel
- Parameters:
aValue
-row
-col
-
-
moveRow
public void moveRow(int from, int to)
Move Row- Parameters:
from
- indexto
- index
-
getDataList
protected ArrayList<ArrayList<Object>> getDataList()
Returns the ArrayList of ArrayLists that contains the table's data values. The ArrayLists contained in the outer vector are each a single row of values.- Returns:
- the ArrayList of ArrayLists containing the tables data values author Teo Sarca [ 1734327 ]
-
-