|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.upb.swtpra05.group03.plugin.RoutingTableModel
This class implements the TableModel interface and is used as a model to the RoutingTable.
| Field Summary | |
private int |
columnCount
This one holds the dimensions of the table |
private static java.lang.String[] |
columnnames
This one holds columnnames |
private DataHolder |
dh
No comment provided by developer, please add a comment to improve documentation. |
private int |
displaystart
This one holds the startpoint of the showed Data window |
private boolean[][] |
isEditable
This one holds editability flags |
private int |
rowCount
This one holds the dimensions of the table |
| Constructor Summary | |
RoutingTableModel(int noRows)
Constructor for the RoutingTableModel object |
|
| Method Summary | |
void |
addTableModelListener(javax.swing.event.TableModelListener l)
This method is not needed and therefore empty. |
java.lang.Class |
getColumnClass(int columnIndex)
Returns the most specific superclass for all the cell values in the column. |
int |
getColumnCount()
Returns the number of columns in the model. |
java.lang.String |
getColumnName(int column)
Returns the name of the column at columnIndex. |
int |
getRowCount()
Returns the number of rows in the model. |
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
Returns the value for the cell at columnIndex and rowIndex. |
boolean |
isCellEditable(int rowIndex,
int columnIndex)
Returns true if the cell at rowIndex and columnIndex is editable.
|
void |
removeTableModelListener(javax.swing.event.TableModelListener l)
This method is not needed and therefore empty. |
void |
setValueAt(java.lang.Object aValue,
int rowIndex,
int columnIndex)
This method is not needed and therefore empty. |
void |
updateData()
This method gets called from the RoutingPanel to update the data of this model |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private boolean[][] isEditable
private int columnCount
private int rowCount
private static final java.lang.String[] columnnames
private int displaystart
private DataHolder dh
| Constructor Detail |
public RoutingTableModel(int noRows)
noRows - Sets the number of rows at the start| Method Detail |
public void addTableModelListener(javax.swing.event.TableModelListener l)
addTableModelListener in interface javax.swing.table.TableModell - A TableModelListenerpublic java.lang.Class getColumnClass(int columnIndex)
JTable to set up a default renderer and editor for the column.
getColumnClass in interface javax.swing.table.TableModelcolumnIndex - the index of the column
public int getColumnCount()
JTable uses this method to
determine how many columns it should create and display by default.
getColumnCount in interface javax.swing.table.TableModelgetRowCount()public java.lang.String getColumnName(int column)
columnIndex. This is used to initialize
the table's column header name. Note: this name does not need to be unique; two columns
in a table can have the same name.
getColumnName in interface javax.swing.table.TableModelcolumn - Description of the Parameter
public int getRowCount()
JTable uses this method to determine
how many rows it should display. This method should be quick, as it is called frequently
during rendering.
getRowCount in interface javax.swing.table.TableModelgetColumnCount()
public java.lang.Object getValueAt(int rowIndex,
int columnIndex)
columnIndex and rowIndex.
getValueAt in interface javax.swing.table.TableModelrowIndex - the row whose value is to be queriedcolumnIndex - the column whose value is to be queried
public boolean isCellEditable(int rowIndex,
int columnIndex)
rowIndex and columnIndex is editable.
Otherwise, setValueAt on the cell will not change the value of that cell.
In this implementation it will return false for every row and column).
isCellEditable in interface javax.swing.table.TableModelrowIndex - the row whose value to be queriedcolumnIndex - the column whose value to be queried
setValueAt(java.lang.Object, int, int)public void removeTableModelListener(javax.swing.event.TableModelListener l)
removeTableModelListener in interface javax.swing.table.TableModell - A TableModelListener
public void setValueAt(java.lang.Object aValue,
int rowIndex,
int columnIndex)
setValueAt in interface javax.swing.table.TableModelaValue - the new valuerowIndex - the row whose value is to be changedcolumnIndex - the column whose value is to be changedpublic void updateData()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||