jigcell.compare.ui
Class BasicTable.BasicTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by jigcell.compare.ui.BasicTable.BasicTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel
Direct Known Subclasses:
Compare2Model, EvaluationErrorViewer.ErrorModel, SeriesDialog.SeriesModel, SeriesView.SeriesModel, TransformDebugger.AnnotationModel, TransformDebugger.ValueModel
Enclosing class:
BasicTable

public abstract static class BasicTable.BasicTableModel
extends javax.swing.table.AbstractTableModel

Base class of the data model used by views.

See Also:
Serialized Form

Nested Class Summary
protected static class BasicTable.BasicTableModel.Marker
          Provides quick access to information about columns in this model.
 
Field Summary
protected  double[] columnWeights
          Weights for resizing columns
protected  BasicTable.BasicTableModel.Marker[] markers
          Column markers of the table
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
BasicTable.BasicTableModel()
          Creates a new table model.
 
Method Summary
 void fillRange(int column, int startRow, int endRow, java.lang.Object value)
          Fills along a column with a particular value.
 void fillRangeAt(int row, int column, int startRow, int endRow)
          Fills along a column.
 void fillSelected(int row, int column, int[] rows)
           
 int findColumn(BasicTable.BasicTableModel.Marker marker)
          The index of a column.
 java.lang.Class getColumnClass(int column)
          The type of objects in a column.
 int getColumnCount()
          The number of columns in the table.
 java.lang.String getColumnName(int column)
          The name of a column.
 double[] getColumnWeights()
           
 java.lang.Object getValueAt(int row, int column)
          
protected  void setColumnMarkers(BasicTable.BasicTableModel.Marker[] markers)
          Sets the table markers used by this mode.
 void setColumnWeights(double[] columnWeights)
           
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.table.TableModel
getRowCount
 

Field Detail

columnWeights

protected double[] columnWeights
Weights for resizing columns


markers

protected BasicTable.BasicTableModel.Marker[] markers
Column markers of the table

Constructor Detail

BasicTable.BasicTableModel

public BasicTable.BasicTableModel()
Creates a new table model.

Method Detail

fillRange

public void fillRange(int column,
                      int startRow,
                      int endRow,
                      java.lang.Object value)
Fills along a column with a particular value.

Parameters:
column - Column
startRow - First row
endRow - Last row
value - Value

fillRangeAt

public void fillRangeAt(int row,
                        int column,
                        int startRow,
                        int endRow)
Fills along a column.

Parameters:
row - Row
column - Column
startRow - First row
endRow - Last row

fillSelected

public void fillSelected(int row,
                         int column,
                         int[] rows)
See Also:
ICellEditorTab.fillSelected(int,int,int[])

findColumn

public int findColumn(BasicTable.BasicTableModel.Marker marker)
The index of a column. If no column has the specified marker, the result is -1.

Parameters:
marker - Column marker

getColumnClass

public java.lang.Class getColumnClass(int column)
The type of objects in a column.

Specified by:
getColumnClass in interface javax.swing.table.TableModel
Overrides:
getColumnClass in class javax.swing.table.AbstractTableModel
Parameters:
column - Index of column

getColumnCount

public int getColumnCount()
The number of columns in the table.


getColumnName

public java.lang.String getColumnName(int column)
The name of a column.

Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel
Parameters:
column - Index of column

getColumnWeights

public double[] getColumnWeights()

getValueAt

public java.lang.Object getValueAt(int row,
                                   int column)


setColumnWeights

public void setColumnWeights(double[] columnWeights)

setColumnMarkers

protected void setColumnMarkers(BasicTable.BasicTableModel.Marker[] markers)
Sets the table markers used by this mode.

Parameters:
markers - Table markers