com.acarter.propertytable
Class PropertyTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by com.acarter.propertytable.PropertyTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class PropertyTableModel
extends javax.swing.table.AbstractTableModel

Author:
Carter
See Also:
Serialized Form

Nested Class Summary
static interface PropertyTableModel.ModelSetValueListener
           
 
Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
PropertyTableModel()
           
 
Method Summary
 void addPropertySection(int index, PropertySection section)
           
 void addPropertySection(PropertySection section)
           
 void addSetValueListener(PropertyTableModel.ModelSetValueListener listener)
           
 int getColumnCount()
           
 java.lang.String getColumnName(int col)
           
 int getPropertSectionCount()
           
 java.lang.Object getPropertyObject(java.lang.String section, java.lang.String name)
           
 PropertySection getPropertySection(int index)
           
 PropertySection getPropertySection(java.lang.String name)
           
 int getRowCount()
          Returns the number of visible row in the table.
 PropertyTableModel.ModelSetValueListener[] getSetValueListeners()
           
 java.lang.Object getValueAt(int row, int column)
           
 boolean isCellEditable(int row, int column)
           
 void removePropertySection(PropertySection section)
           
 void removePropertySection(java.lang.String sectionName)
           
 void removeSetValueListener(PropertyTableModel.ModelSetValueListener listener)
           
 void setValueAt(java.lang.Object value, int row, int column)
           
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyTableModel

public PropertyTableModel()
Method Detail

addPropertySection

public void addPropertySection(PropertySection section)
Parameters:
section -

removePropertySection

public void removePropertySection(java.lang.String sectionName)
Parameters:
sectionName -

removePropertySection

public void removePropertySection(PropertySection section)
Parameters:
section -

addPropertySection

public void addPropertySection(int index,
                               PropertySection section)
Parameters:
section -

getPropertyObject

public java.lang.Object getPropertyObject(java.lang.String section,
                                          java.lang.String name)
Parameters:
section -
name -
Returns:

getPropertySection

public PropertySection getPropertySection(java.lang.String name)
Parameters:
name -
Returns:

getPropertySection

public PropertySection getPropertySection(int index)
Parameters:
index -
Returns:

getPropertSectionCount

public int getPropertSectionCount()
Returns:

getColumnName

public java.lang.String getColumnName(int col)
Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel

getColumnCount

public int getColumnCount()
See Also:
TableModel.getColumnCount()

getRowCount

public int getRowCount()
Returns the number of visible row in the table.

See Also:
TableModel.getRowCount()

isCellEditable

public boolean isCellEditable(int row,
                              int column)
Specified by:
isCellEditable in interface javax.swing.table.TableModel
Overrides:
isCellEditable in class javax.swing.table.AbstractTableModel

getValueAt

public java.lang.Object getValueAt(int row,
                                   int column)
See Also:
TableModel.getValueAt(int, int)

setValueAt

public void setValueAt(java.lang.Object value,
                       int row,
                       int column)
Specified by:
setValueAt in interface javax.swing.table.TableModel
Overrides:
setValueAt in class javax.swing.table.AbstractTableModel
See Also:
TableModel.setValueAt(Object, int, int)

addSetValueListener

public void addSetValueListener(PropertyTableModel.ModelSetValueListener listener)
Parameters:
listener -

removeSetValueListener

public void removeSetValueListener(PropertyTableModel.ModelSetValueListener listener)
Parameters:
listener -

getSetValueListeners

public PropertyTableModel.ModelSetValueListener[] getSetValueListeners()
Parameters:
listener -