Package pulse.ui.components.models
Class ResultTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- javax.swing.table.DefaultTableModel
-
- pulse.ui.components.models.ResultTableModel
-
- All Implemented Interfaces:
Serializable
,TableModel
public class ResultTableModel extends DefaultTableModel
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class javax.swing.table.DefaultTableModel
columnIdentifiers, dataVector
-
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
-
Constructor Summary
Constructors Constructor Description ResultTableModel(ResultFormat fmt)
ResultTableModel(ResultFormat fmt, int rowCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(ResultListener listener)
void
addRow(AbstractResult result)
void
changeFormat(ResultFormat fmt)
void
clear()
ResultFormat
getFormat()
List<AbstractResult>
getResults()
List<String>
getTooltips()
List<AbstractResult>
group(List<AbstractResult> listOfResults, AbstractResult r, double propertyInterval)
Takes a list of results, which should be mandatory sorted in the order of ascending id values, and searches for those results that can be merged withr
, satisfying these criteria: (a) these results correspond to test temperatures within a specifiedtemperatureDelta
(b) they form a single sequence of measurementsboolean
isCellEditable(int row, int column)
void
merge(double temperatureDelta)
Transforms the result model by merging individual results which: (a) correspond to test temperatures within a specifiedtemperatureDelta
(b) form a single sequence of measurementsvoid
remove(AbstractResult r)
void
removeAll(Identifier id)
void
removeListeners()
void
resetSession()
-
Methods inherited from class javax.swing.table.DefaultTableModel
addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, getColumnCount, getColumnName, getDataVector, getRowCount, getValueAt, insertRow, insertRow, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setRowCount, setValueAt
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener
-
-
-
-
Constructor Detail
-
ResultTableModel
public ResultTableModel(ResultFormat fmt, int rowCount)
-
ResultTableModel
public ResultTableModel(ResultFormat fmt)
-
-
Method Detail
-
resetSession
public void resetSession()
-
addListener
public void addListener(ResultListener listener)
-
removeListeners
public void removeListeners()
-
clear
public void clear()
-
isCellEditable
public boolean isCellEditable(int row, int column)
- Specified by:
isCellEditable
in interfaceTableModel
- Overrides:
isCellEditable
in classDefaultTableModel
-
changeFormat
public void changeFormat(ResultFormat fmt)
-
merge
public void merge(double temperatureDelta)
Transforms the result model by merging individual results which: (a) correspond to test temperatures within a specifiedtemperatureDelta
(b) form a single sequence of measurements- Parameters:
temperatureDelta
- the maximum difference between the test temperature of two results being merged
-
group
public List<AbstractResult> group(List<AbstractResult> listOfResults, AbstractResult r, double propertyInterval)
Takes a list of results, which should be mandatory sorted in the order of ascending id values, and searches for those results that can be merged withr
, satisfying these criteria: (a) these results correspond to test temperatures within a specifiedtemperatureDelta
(b) they form a single sequence of measurements- Parameters:
listOfResults
- an orderer list of results, as explained abover
- the result of interestpropertyInterval
- an interval for the temperature merging- Returns:
- a group of results
-
addRow
public void addRow(AbstractResult result)
-
removeAll
public void removeAll(Identifier id)
-
remove
public void remove(AbstractResult r)
-
getResults
public List<AbstractResult> getResults()
-
getFormat
public ResultFormat getFormat()
-
-