|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.table.AbstractTableModel | +--ch.elca.dependency.gui.DependencyTableModel
This class is the data model for the dependency list table in the
DependencyDialog
. It is responsible for managing the
table entries.
Field Summary |
Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
Constructor Summary | |
DependencyTableModel()
Constructor |
Method Summary | |
void |
addDependency(java.lang.String name,
java.lang.String type,
java.lang.String to)
Adds the dependency to the list. |
void |
clear()
Clears the whole table model that means all the rows are deleted. |
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 this data table. |
java.lang.String |
getColumnName(int col)
Returns the column name. |
int |
getRowCount()
Returns the number of rows in this data table. |
java.lang.Object |
getValueAt(int row,
int col)
Returns an attribute value for the cell at row
and column . |
boolean |
isCellEditable(int rowIndex,
int columnIndex)
Returns false for all cells except the first which is the check box for marking a filter entry. |
void |
setValueAt(java.lang.Object aValue,
int rowIndex,
int columnIndex)
Sets the value in the cell at columnIndex and
rowIndex to aValue . |
void |
sortAllRowsBy(int colIndex,
boolean ascending)
Sorts all the rows of the JTable in the specified order. |
Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DependencyTableModel()
Method Detail |
public int getColumnCount()
public int getRowCount()
public java.lang.Object getValueAt(int row, int col)
row
and column
.
row
- the row whose value is to be queried
java.lang.ArrayIndexOutOfBoundsException
- if an invalid row or
column was givenpublic java.lang.String getColumnName(int col)
getColumnName
in interface javax.swing.table.TableModel
getColumnName
in class javax.swing.table.AbstractTableModel
null
or does not have an entry for
this index, returns the default name provided by the superclass.public java.lang.Class getColumnClass(int columnIndex)
JTable
to set up a
default renderer and editor for the column.
getColumnClass
in interface javax.swing.table.TableModel
getColumnClass
in class javax.swing.table.AbstractTableModel
columnIndex
- the index of the column
public void setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)
columnIndex
and
rowIndex
to aValue
.
setValueAt
in interface javax.swing.table.TableModel
setValueAt
in class javax.swing.table.AbstractTableModel
aValue
- the new valuerowIndex
- the row whose value is to be changedcolumnIndex
- the column whose value is to be changedgetValueAt(int, int)
,
isCellEditable(int, int)
public void addDependency(java.lang.String name, java.lang.String type, java.lang.String to)
name
- Name of the added class.to
- Name of the class where the dependency goes to.public boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface javax.swing.table.TableModel
isCellEditable
in class javax.swing.table.AbstractTableModel
rowIndex
- the row being queriedcolumnIndex
- the column being queried
public void clear()
public void sortAllRowsBy(int colIndex, boolean ascending)
JTable
in the specified order.
The sort is done in order to the specified column. Null values alvays
appear last.
colIndex
- Column index which counts for the sort of the rows.ascending
- Flag specifying the order of the sort.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |