org.openswing.swing.pivottable.tablemodelreaders.server
Class VOTableModel

java.lang.Object
  extended byjavax.swing.table.AbstractTableModel
      extended byorg.openswing.swing.pivottable.tablemodelreaders.server.VOTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class VOTableModel
extends javax.swing.table.AbstractTableModel

Title: OpenSwing Framework

Description: TableModel implementation, based on a list of ValueObjects.

Copyright: Copyright (C) 2006 Mauro Carniel

This file is part of OpenSwing Framework. This library is free software; you can redistribute it and/or modify it under the terms of the (LGPL) Lesser General Public License as published by the Free Software Foundation; GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. The author may be contacted at: maurocarniel@tin.it

See Also:
Serialized Form

Constructor Summary
VOTableModel(java.util.List valueObjects, java.lang.String[] attributeNames)
          Constructs a TableModel, starting from the specified list of ValueObjects, having the specified list of attributes
 
Method Summary
 java.lang.Class getColumnClass(int columnIndex)
           
 int getColumnCount()
           
 java.lang.String getColumnName(int columnIndex)
          getColumnName
 int getRowCount()
           
 java.lang.Object getValueAt(int rowIndex, int colIndex)
           
 ValueObject getValueObject(int row)
           
 boolean isCellEditable(int rowIndex, int columnIndex)
           
 void setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)
          setValueAt
 
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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VOTableModel

public VOTableModel(java.util.List valueObjects,
                    java.lang.String[] attributeNames)
Constructs a TableModel, starting from the specified list of ValueObjects, having the specified list of attributes

Parameters:
valueObjects - list of ValueObjects
attributeNames - nome of attributes defined within the ValueObjects, used to define the TableModel
Method Detail

getValueObject

public final ValueObject getValueObject(int row)
Parameters:
row - row number
Returns:
ValueObject

getColumnCount

public final int getColumnCount()

getRowCount

public final int getRowCount()

isCellEditable

public final boolean isCellEditable(int rowIndex,
                                    int columnIndex)

getColumnClass

public final java.lang.Class getColumnClass(int columnIndex)

getValueAt

public final java.lang.Object getValueAt(int rowIndex,
                                         int colIndex)

setValueAt

public final void setValueAt(java.lang.Object aValue,
                             int rowIndex,
                             int columnIndex)
setValueAt

Parameters:
aValue - Object
rowIndex - int
columnIndex - int

getColumnName

public final java.lang.String getColumnName(int columnIndex)
getColumnName

Parameters:
columnIndex - int
Returns:
String