org.viewaframework.widget.view.ui
Class MasterViewModel<T>

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by org.viewaframework.widget.view.ui.MasterViewModel<T>
Type Parameters:
T -
All Implemented Interfaces:
Serializable, TableModel

public class MasterViewModel<T>
extends AbstractTableModel

Author:
Mario Garcia
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
MasterViewModel(List<MasterViewColumn> columns, JTable table)
           
 
Method Summary
 void addAll(Collection<T> srcList)
           
 void addRow(T e)
           
 void clear()
           
 boolean contains(T e)
           
 Class<?> getColumnClass(int columnIndex)
           
 int getColumnCount()
           
 String getColumnName(int column)
           
 T getRow(Integer rowIndex)
           
 int getRowCount()
           
 T getSelectedObject()
           
 Object getValueAt(int rowIndex, int columnIndex)
           
 void removeRow(T e)
           
 void setSelectedObject(T e)
           
 
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
 

Constructor Detail

MasterViewModel

public MasterViewModel(List<MasterViewColumn> columns,
                       JTable table)
Parameters:
columns -
table -
Method Detail

addAll

public void addAll(Collection<T> srcList)
Parameters:
srcList -

addRow

public void addRow(T e)
Parameters:
e -

clear

public void clear()

contains

public boolean contains(T e)
Parameters:
e -
Returns:

getColumnClass

public Class<?> getColumnClass(int columnIndex)
Specified by:
getColumnClass in interface TableModel
Overrides:
getColumnClass in class AbstractTableModel

getColumnCount

public int getColumnCount()

getColumnName

public String getColumnName(int column)
Specified by:
getColumnName in interface TableModel
Overrides:
getColumnName in class AbstractTableModel

getRow

public T getRow(Integer rowIndex)
Parameters:
rowIndex -
Returns:

getRowCount

public int getRowCount()

getSelectedObject

public T getSelectedObject()
Returns:

getValueAt

public Object getValueAt(int rowIndex,
                         int columnIndex)

removeRow

public void removeRow(T e)
Parameters:
e -

setSelectedObject

public void setSelectedObject(T e)
Parameters:
e -


Copyright © 2010. All Rights Reserved.