com.tirsen.angkor.beans
Class JavaBeanTableModel

java.lang.Object
  |
  +--com.tirsen.angkor.table.AbstractTableModel
        |
        +--com.tirsen.angkor.beans.JavaBeanTableModel
All Implemented Interfaces:
ChangeSource, java.io.Serializable, TableModel

public class JavaBeanTableModel
extends AbstractTableModel

See Also:
Serialized Form

Nested Class Summary
static interface JavaBeanTableModel.TableColumnModel
           
 
Constructor Summary
JavaBeanTableModel()
           
JavaBeanTableModel(java.lang.Class rowClass)
           
 
Method Summary
 void addColumn(JavaBeanTableModel.TableColumnModel column)
           
 void addColumn(java.lang.String name, java.lang.String property)
           
 void empty()
           
 java.beans.PropertyDescriptor findProperty(java.lang.String property)
           
 int getColumnCount()
           
 java.lang.String getColumnName(int column)
           
 java.lang.Object getRow(int row)
          Gets the value object for a specified row, also checks wheather row is within range specified by AbstractTableModel.setRange(int,int).
 int getRowCount()
           
 ValueModel getValueAt(int row, int column)
           
 void resetColumns()
          Resets the columns.
 void setRow(int row, java.lang.Object object)
           
 void setRows(int startRow, java.util.Collection objects)
          Sets a segment of rows starting at specified startRow.
 void setRows(java.util.Iterator iterator)
           
 void setRows(java.util.List rows)
           
 void setRows(java.lang.Object[] rows)
           
 
Methods inherited from class com.tirsen.angkor.table.AbstractTableModel
addChangeListener, getEnd, getRowCountInRange, getStart, removeChangeListener, setRange, setRowCount, signalChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaBeanTableModel

public JavaBeanTableModel()

JavaBeanTableModel

public JavaBeanTableModel(java.lang.Class rowClass)
Method Detail

resetColumns

public void resetColumns()
Resets the columns.


addColumn

public void addColumn(JavaBeanTableModel.TableColumnModel column)

findProperty

public java.beans.PropertyDescriptor findProperty(java.lang.String property)

addColumn

public void addColumn(java.lang.String name,
                      java.lang.String property)

getColumnName

public java.lang.String getColumnName(int column)

getColumnCount

public int getColumnCount()

getValueAt

public ValueModel getValueAt(int row,
                             int column)

getRow

public java.lang.Object getRow(int row)
Gets the value object for a specified row, also checks wheather row is within range specified by AbstractTableModel.setRange(int,int).

Throws:
java.lang.IllegalArgumentException - if row parameter is outside specified range.

getRowCount

public int getRowCount()
Specified by:
getRowCount in interface TableModel
Overrides:
getRowCount in class AbstractTableModel

setRow

public void setRow(int row,
                   java.lang.Object object)

setRows

public void setRows(int startRow,
                    java.util.Collection objects)
Sets a segment of rows starting at specified startRow.


setRows

public void setRows(java.lang.Object[] rows)

setRows

public void setRows(java.util.List rows)

setRows

public void setRows(java.util.Iterator iterator)

empty

public void empty()
Overrides:
empty in class AbstractTableModel


Copyright © 2002-2002 . All Rights Reserved.