org.eodisp.ui.sm.models
Class SmErrorModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by org.eodisp.ui.sm.models.SmErrorModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel, EodispModel

public class SmErrorModel
extends javax.swing.table.AbstractTableModel
implements EodispModel

This is the model for the property sheet used in the simulation manager application. It will display the properties of an object item in the simulation manager project file.

This model can be used by a JTable to display the properties.

This model is tightly coupled with the Emf framework. The model itself holds no data, all data is directly retrieved from the Emf framework.

Version:
$Id:SMPropertySheetModel.java 1941 2006-04-21 11:30:46Z eglimi $
Author:
eglimi
See Also:
Serialized Form

Field Summary
(package private) static org.apache.log4j.Logger logger
          Log4J logger for this class
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
SmErrorModel()
          Constructor.
 
Method Summary
 void doSave()
          Executes the save command in the model.
 void doUpdate()
           Instructs the model to do an update of its data.
 int getColumnCount()
          
 java.lang.String getColumnName(int column)
          
 int getRowCount()
          
 java.lang.Object getValueAt(int rowIndex, int columnIndex)
          
 boolean hasChanges()
          Returns a value stating whether the model has some changes since the last change.
 boolean isCellEditable(int rowIndex, int columnIndex)
          
 void redo()
          This re-performs the last command executed by the model.
 void setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)
          
 void undo()
          This makes and undo of the last command executed by the model.
 
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

logger

static org.apache.log4j.Logger logger
Log4J logger for this class

Constructor Detail

SmErrorModel

public SmErrorModel()
Constructor.

Method Detail

getColumnCount

public int getColumnCount()

Specified by:
getColumnCount in interface javax.swing.table.TableModel

getColumnName

public java.lang.String getColumnName(int column)

Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel

getRowCount

public int getRowCount()

Specified by:
getRowCount in interface javax.swing.table.TableModel

getValueAt

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

Specified by:
getValueAt in interface javax.swing.table.TableModel

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int columnIndex)

Specified by:
isCellEditable in interface javax.swing.table.TableModel
Overrides:
isCellEditable in class javax.swing.table.AbstractTableModel

setValueAt

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

Specified by:
setValueAt in interface javax.swing.table.TableModel
Overrides:
setValueAt in class javax.swing.table.AbstractTableModel

hasChanges

public boolean hasChanges()
Returns a value stating whether the model has some changes since the last change.

Specified by:
hasChanges in interface EodispModel
Returns:
True if the model has changes since the last change or false, if there are no changes.

doSave

public void doSave()
            throws java.io.IOException
Executes the save command in the model. This saves the changes since the last save persistently.

Specified by:
doSave in interface EodispModel
Throws:
java.io.IOException - thrown when the data could not be saved persistently. This should lead to a visual indication to the user.

doUpdate

public void doUpdate()

Instructs the model to do an update of its data. Many EodispModels are just intermediated models for view components and do not hold the actual data. The actual data is usually retrieved and maintained by a persistency framework. Thus, if the real data has been changed, a model can be informed of this updated and it can be instructed to reload the data.

This should in most cases lead to an update of the visual component representing the data as well.

Specified by:
doUpdate in interface EodispModel

redo

public void redo()
This re-performs the last command executed by the model. How a redo is implemented depends on the model. This operation might not be available on all models. Models not supporting redo should ignore such a request.

Specified by:
redo in interface EodispModel

undo

public void undo()
This makes and undo of the last command executed by the model. How an undo is implemented depends on the model. This operation might not be available on all models. Models not supporting undo should ignore such a request.

Specified by:
undo in interface EodispModel