org.apache.commons.jelly.tags.swing.model
Class ExpressionTableModel

java.lang.Object
  extended byjavax.swing.table.AbstractTableModel
      extended byorg.apache.commons.jelly.tags.swing.model.ExpressionTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class ExpressionTableModel
extends javax.swing.table.AbstractTableModel

A Swing TableModel that uses a List of rows with pluggable Expressions to evaluate the value of the cells

Version:
$Revision: 155420 $
Author:
James Strachan
See Also:
Serialized Form

Nested Class Summary
protected static class ExpressionTableModel.MyTableColumnModel
           
 
Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
ExpressionTableModel()
           
 
Method Summary
 void addColumn(ExpressionTableColumn column)
          Adds a new column definition to the table
 int getColumnCount()
           
 java.util.List getColumnList()
          Returns the column definitions.
 javax.swing.table.TableColumnModel getColumnModel()
           
 java.lang.String getColumnName(int columnIndex)
           
 org.apache.commons.jelly.JellyContext getContext()
          Returns the context.
 int getRowCount()
           
 java.util.List getRows()
          Returns the list of rows.
 java.lang.Object getValueAt(int rowIndex, int columnIndex)
           
 void removeColumn(ExpressionTableColumn column)
          Removes a column definition from the table
 void setContext(org.apache.commons.jelly.JellyContext context)
          Sets the context.
 void setRows(java.util.List rows)
          Sets the list of rows.
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, 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

ExpressionTableModel

public ExpressionTableModel()
Method Detail

getColumnList

public java.util.List getColumnList()
Returns the column definitions.

Returns:
List

getColumnModel

public javax.swing.table.TableColumnModel getColumnModel()
Returns:
the TableColumnModel

addColumn

public void addColumn(ExpressionTableColumn column)
Adds a new column definition to the table


removeColumn

public void removeColumn(ExpressionTableColumn column)
Removes a column definition from the table


getRowCount

public int getRowCount()

getColumnCount

public int getColumnCount()

getColumnName

public java.lang.String getColumnName(int columnIndex)

getValueAt

public java.lang.Object getValueAt(int rowIndex,
                                   int columnIndex)

getRows

public java.util.List getRows()
Returns the list of rows.

Returns:
List

setRows

public void setRows(java.util.List rows)
Sets the list of rows.

Parameters:
rows - The rows to set

getContext

public org.apache.commons.jelly.JellyContext getContext()
Returns the context.

Returns:
JellyContext

setContext

public void setContext(org.apache.commons.jelly.JellyContext context)
Sets the context.

Parameters:
context - The context to set


Copyright © 2002-2006 Apache Software Foundation. All Rights Reserved.