Rings
Version 0.3

threeD.ui.panels
Class EditablePropertiesTableModel

java.lang.Object
  extended byjavax.swing.table.AbstractTableModel
      extended bythreeD.ui.panels.EditablePropertiesTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class EditablePropertiesTableModel
extends javax.swing.table.AbstractTableModel

An EditablePropertiesTableModel object can be used to manage the data needed when displaying the properties of an Editable object in a table. The table model also handles applying changes made in the table to the stored Editable object.

See Also:
Serialized Form

Field Summary
static java.lang.String[] columnNames
           
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
EditablePropertiesTableModel()
          Constructs a new EditablePropertiesTableModel object.
EditablePropertiesTableModel(Editable editing)
          Constructs a new EditablePropertiesTableModel object using the specified Editable object.
 
Method Summary
 int getColumnCount()
          Returns the number of columns (4) of this table model.
 java.lang.String getColumnName(int index)
          Returns the name of the column at the specified index.
 Editable getEditing()
          Returns the Editable object used by this EditablePropertiesTableModel object.
 int getRowCount()
          Returns the number of rows (editable properties displayed) in this table model.
 java.lang.Object getValueAt(int row, int column)
          Returns the value for the cell at the specified row and column index.
 boolean isCellEditable(int row, int column)
          Returns true if the cell at the specified row and column is editable.
 void setEditing(Editable editing)
          Sets the Editable object used by this EditablePropertiesTableModel object to the specified Editable object and notifies listeners that all table data may have changed.
 void setValueAt(java.lang.Object value, int row, int column)
          Sets the value of the Editable object property that is represented in the cell at the specified row and column index to the specified value and notifies listeners that the cell value may have changed.
 
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
 

Field Detail

columnNames

public static final java.lang.String[] columnNames
Constructor Detail

EditablePropertiesTableModel

public EditablePropertiesTableModel()
Constructs a new EditablePropertiesTableModel object.


EditablePropertiesTableModel

public EditablePropertiesTableModel(Editable editing)
Constructs a new EditablePropertiesTableModel object using the specified Editable object.

Method Detail

setEditing

public void setEditing(Editable editing)
Sets the Editable object used by this EditablePropertiesTableModel object to the specified Editable object and notifies listeners that all table data may have changed.


getEditing

public Editable getEditing()
Returns the Editable object used by this EditablePropertiesTableModel object.


getColumnName

public java.lang.String getColumnName(int index)
Returns the name of the column at the specified index.


isCellEditable

public boolean isCellEditable(int row,
                              int column)
Returns true if the cell at the specified row and column is editable.


getRowCount

public int getRowCount()
Returns the number of rows (editable properties displayed) in this table model.


getColumnCount

public int getColumnCount()
Returns the number of columns (4) of this table model.


getValueAt

public java.lang.Object getValueAt(int row,
                                   int column)
Returns the value for the cell at the specified row and column index.


setValueAt

public void setValueAt(java.lang.Object value,
                       int row,
                       int column)
Sets the value of the Editable object property that is represented in the cell at the specified row and column index to the specified value and notifies listeners that the cell value may have changed. If the cell is not editable (does not represent an editable property) this method will do nothing.


Rings
Version 0.3

Copyright 2003-05 Mike Murray