com.jaxfront.swing.ui.visualizers
Class AbstractListTypeTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by com.jaxfront.swing.ui.visualizers.AbstractListTypeTableModel
All Implemented Interfaces:
DOMChangeListener, java.io.Serializable, java.util.EventListener, javax.swing.table.TableModel
Direct Known Subclasses:
SimpleTypeListTableModel

public abstract class AbstractListTypeTableModel
extends javax.swing.table.AbstractTableModel
implements DOMChangeListener

This class represents an AbstractListTypeTableModel which is derived from the AbstractTableModel. The AbstractListTypeTableModel acts as a TableModel for tables of Visualizers that hold child Visualizers in a list.

Version:
1.60
See Also:
Serialized Form

Constructor Summary
AbstractListTypeTableModel(ListType listType)
          AbstractListTypeTableModel constructor.
 
Method Summary
 void domChanged(DOMChangeEvent event)
          Manages DOMChangeEvents for this visualizer.
 java.lang.Class getColumnClass(int columnIndex)
          Gets the class of the type at the required column position.
abstract  int getColumnCount()
          Gets the number of columns of the current table.
abstract  java.lang.String getColumnName(int column)
          Gets the name of the required column.
 ListType getList()
          Gets the current list type.
 int getRowCount()
          Gets the number of rows of the current table.
 Type getType(int rowIndex)
          Gets the type at the required row position.
abstract  java.lang.Object getValueAt(int rowIndex, int columnIndex)
          Gets the value of the required table position.
 boolean isCellEditable(int row, int column)
          Defines if the required table cell is editable or not.
abstract  void setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)
          Sets a value at the required table position.
 
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

AbstractListTypeTableModel

public AbstractListTypeTableModel(ListType listType)
AbstractListTypeTableModel constructor.

Parameters:
listType - a listType that needs the AbstractListTypeTableModel
Method Detail

domChanged

public void domChanged(DOMChangeEvent event)
Manages DOMChangeEvents for this visualizer.

Specified by:
domChanged in interface DOMChangeListener
Parameters:
event - a DOMChangeEvent that occured

getColumnClass

public java.lang.Class getColumnClass(int columnIndex)
Gets the class of the type at the required column position.

Specified by:
getColumnClass in interface javax.swing.table.TableModel
Overrides:
getColumnClass in class javax.swing.table.AbstractTableModel
Parameters:
columnIndex - the index of the column
Returns:
the class of the type at the required column position

getColumnCount

public abstract int getColumnCount()
Gets the number of columns of the current table.

Specified by:
getColumnCount in interface javax.swing.table.TableModel
Returns:
the number of columns of the current table

getColumnName

public abstract java.lang.String getColumnName(int column)
Gets the name of the required column.

Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel
Returns:
the name of the required column

getList

public ListType getList()
Gets the current list type.

Returns:
the current list type

getRowCount

public int getRowCount()
Gets the number of rows of the current table.

Specified by:
getRowCount in interface javax.swing.table.TableModel
Returns:
the number of rows of the current table

getType

public Type getType(int rowIndex)
Gets the type at the required row position.

Parameters:
rowIndex - row position
Returns:
the type at the required row position

getValueAt

public abstract java.lang.Object getValueAt(int rowIndex,
                                            int columnIndex)
Gets the value of the required table position.

Specified by:
getValueAt in interface javax.swing.table.TableModel
Parameters:
rowIndex - row position
columnIndex - column position
Returns:
an Object that contains the value of the required table position

isCellEditable

public boolean isCellEditable(int row,
                              int column)
Defines if the required table cell is editable or not.

Specified by:
isCellEditable in interface javax.swing.table.TableModel
Overrides:
isCellEditable in class javax.swing.table.AbstractTableModel
Parameters:
row - row position
column - column position
Returns:
true if table cell is editable, false otherwise

setValueAt

public abstract void setValueAt(java.lang.Object aValue,
                                int rowIndex,
                                int columnIndex)
Sets a value at the required table position.

Specified by:
setValueAt in interface javax.swing.table.TableModel
Overrides:
setValueAt in class javax.swing.table.AbstractTableModel
Parameters:
aValue - a new value to be set
rowIndex - row position
columnIndex - column position