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, setXColumnLabeladdTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListenerpublic XyTableModel(javax.swing.JTable myJTable,
XyDataModel parent)
parent - the parentpublic void initilizeTabelModel()
TableModelTableModel.columnTitles and TableModel.tableModelDataVector, .initilizeTabelModel in class TableModelpublic void rebuildTableModel()
TableModelrebuildTableModel in class TableModelpublic 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.TableModelgetColumnClass in class javax.swing.table.AbstractTableModelpublic static java.lang.String getDefaultKeyColumnTitle()
public void setSeriesLabel(int seriesIndex,
java.lang.String label)
throws NoSuchSeriesException
TableModelsetSeriesLabel in class TableModelseriesIndex - 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.TableModelisCellEditable in class javax.swing.table.AbstractTableModelpublic 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)
TableModeladdEmptyRow in class TableModeljTable - the current JTablepublic void removeRow(javax.swing.JTable jTable)
TableModelremoveRow in class TableModeljTable - the j tablepublic void addSeries(DataSeries newSeries)
TableModeladdSeries in class TableModelpublic void exchangeSeries(int seriesIndex,
DataSeries newSeries)
exchangeSeries in class TableModelseriesIndex - the series indexnewSeries - the new seriespublic void removeSeries(int seriesIndex)
throws NoSuchSeriesException
removeSeries in class TableModelseriesIndex - 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