Package adams.gui.visualization.sequence
Class XYSequenceTable.Model
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- adams.gui.core.AbstractBaseTableModel
-
- adams.gui.visualization.sequence.XYSequenceTable.Model
-
- All Implemented Interfaces:
LoggingLevelHandler
,LoggingSupporter
,SpreadSheetSupporter
,Serializable
,TableModel
- Enclosing class:
- XYSequenceTable
public static class XYSequenceTable.Model extends AbstractBaseTableModel
Abstract table model for sequences.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected List<XYSequencePoint>
m_Points
the points.protected XYSequence
m_Sequence
the underlying data.-
Fields inherited from class adams.gui.core.AbstractBaseTableModel
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
-
Constructor Summary
Constructors Constructor Description Model(XYSequence sequence)
Initializes the model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class
getColumnClass(int column)
Returns the class for the column.int
getColumnCount()
Returns the number of columns in the table.String
getColumnName(int column)
Returns the name of the result.XYSequencePoint
getPointAt(int row, int column)
Returns the sequence point at the given position.int
getRowCount()
Returns the number of rows/targets in the sequence.XYSequence
getSequence()
Returns the underlying sequence.Object
getValueAt(int row, int column)
Returns the value at the given position.protected Object
getValueAt(XYSequencePoint point, int column)
Returns the value at the specified column for a sequence point.-
Methods inherited from class adams.gui.core.AbstractBaseTableModel
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, setLoggingLevel, toSpreadSheet, toString
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
-
-
-
-
Field Detail
-
m_Sequence
protected XYSequence m_Sequence
the underlying data.
-
m_Points
protected List<XYSequencePoint> m_Points
the points.
-
-
Constructor Detail
-
Model
public Model(XYSequence sequence)
Initializes the model.- Parameters:
sequence
- the sequence to base the model on
-
-
Method Detail
-
getSequence
public XYSequence getSequence()
Returns the underlying sequence.- Returns:
- the sequence
-
getRowCount
public int getRowCount()
Returns the number of rows/targets in the sequence.- Returns:
- the number of rows
-
getColumnCount
public int getColumnCount()
Returns the number of columns in the table.- Returns:
- the number of columns
-
getColumnName
public String getColumnName(int column)
Returns the name of the result.- Specified by:
getColumnName
in interfaceTableModel
- Overrides:
getColumnName
in classAbstractTableModel
- Parameters:
column
- the column to retrieve the name for- Returns:
- the name of the column
-
getValueAt
protected Object getValueAt(XYSequencePoint point, int column)
Returns the value at the specified column for a sequence point.- Parameters:
point
- the point to get the value fromcolumn
- the column to get the value for- Returns:
- the value
-
getValueAt
public Object getValueAt(int row, int column)
Returns the value at the given position.- Parameters:
row
- the row in the tablecolumn
- the column in the table- Returns:
- the value
-
getPointAt
public XYSequencePoint getPointAt(int row, int column)
Returns the sequence point at the given position.- Parameters:
row
- the row in the tablecolumn
- the column in the table- Returns:
- the point
-
getColumnClass
public Class getColumnClass(int column)
Returns the class for the column.- Specified by:
getColumnClass
in interfaceTableModel
- Overrides:
getColumnClass
in classAbstractTableModel
- Parameters:
column
- the column to retrieve the class for- Returns:
- the class
-
-