public class XyTableModel extends TableModel
columnTitles, latestChangedValue, parentDataModel, tableModelDataVector
Constructor and Description |
---|
XyTableModel(javax.swing.JTable myJTable,
XyDataModel parent)
Instantiates a new XyTableModel.
|
Modifier and Type | Method and Description |
---|---|
void |
addEmptyRow(javax.swing.JTable jTable)
Adds a new empty row to the table model.
|
void |
addSeries(DataSeries newSeries)
Add a data series to the table model
|
void |
exchangeSeries(int seriesIndex,
DataSeries newSeries)
Exchanges the specified data series with a new data series.
|
void |
focusSeries(int targetSeriesIndex)
Focuses the specified series.
|
java.lang.Class<?> |
getColumnClass(int columnIndex) |
static java.lang.String |
getDefaultKeyColumnTitle() |
int |
getFocusedSeriesIndex()
Gets the focused series index.
|
java.util.Vector<TableModelDataVector> |
getSeriesTableModels()
Gets the series table models.
|
void |
initilizeTabelModel()
Initialises the local table model and (re)sets the local values
for
TableModel.columnTitles and TableModel.tableModelDataVector , . |
boolean |
isCellEditable(int rowIndex,
int columnIndex) |
void |
move(javax.swing.JTable jTable,
int direction)
Moves the current selection according to the direction.
|
void |
rebuildTableModel()
Rebuilds the current table model.
|
void |
rebuildXyDataSeries(int seriesIndex)
Rebuilds the table model for the specified XYDataSeries.
|
void |
removeRow(javax.swing.JTable jTable)
Removes the row.
|
void |
removeSeries(int seriesIndex)
Removes a XY Series from the table model
|
void |
setSeriesLabel(int seriesIndex,
java.lang.String label)
Sets the label for the table column containing the data series with the given index.
|
void |
tableChanged(javax.swing.event.TableModelEvent tme) |
getColumnCount, getColumnName, getColumnWidths, getKeyHashSetFromDataSeries, getLatestChangedValue, getRow, getRowCount, getRowIndexByKey, getTableDataAsObjectVector, getTableDataAsObjectVector, getTableModelDataVector, getValueAt, getValueByKey, isEmptyTableModelRow, isEmptyTableModelRow, removeEmptyRows, removeRowByKey, setColumnWidths, setLatestChangedValue, setValueAt, setXColumnLabel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
public XyTableModel(javax.swing.JTable myJTable, XyDataModel parent)
parent
- the parentpublic void initilizeTabelModel()
TableModel
TableModel.columnTitles
and TableModel.tableModelDataVector
, .initilizeTabelModel
in class TableModel
public void rebuildTableModel()
TableModel
rebuildTableModel
in class TableModel
public void rebuildXyDataSeries(int seriesIndex)
seriesIndex
- the series index of the XyDataSeries to changepublic java.lang.Class<?> getColumnClass(int columnIndex)
getColumnClass
in interface javax.swing.table.TableModel
getColumnClass
in class javax.swing.table.AbstractTableModel
public static java.lang.String getDefaultKeyColumnTitle()
public void setSeriesLabel(int seriesIndex, java.lang.String label) throws NoSuchSeriesException
TableModel
setSeriesLabel
in class TableModel
seriesIndex
- The series indexlabel
- The labelNoSuchSeriesException
- Thrown if there is no series with this indexpublic boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface javax.swing.table.TableModel
isCellEditable
in class javax.swing.table.AbstractTableModel
public java.util.Vector<TableModelDataVector> getSeriesTableModels()
public int getFocusedSeriesIndex()
public void focusSeries(int targetSeriesIndex)
targetSeriesIndex
- the target series indexNoSuchSeriesException
- the no such series exceptionpublic void addEmptyRow(javax.swing.JTable jTable)
TableModel
addEmptyRow
in class TableModel
jTable
- the current JTablepublic void removeRow(javax.swing.JTable jTable)
TableModel
removeRow
in class TableModel
jTable
- the j tablepublic void addSeries(DataSeries newSeries)
TableModel
addSeries
in class TableModel
public void exchangeSeries(int seriesIndex, DataSeries newSeries)
exchangeSeries
in class TableModel
seriesIndex
- the series indexnewSeries
- the new seriespublic void removeSeries(int seriesIndex) throws NoSuchSeriesException
removeSeries
in class TableModel
seriesIndex
- The index of the series to be removedNoSuchSeriesException
- Will be thrown if there is no series with the specified indexpublic void tableChanged(javax.swing.event.TableModelEvent tme)
public void move(javax.swing.JTable jTable, int direction)
direction
- the direction to move