com.dlsc.flexgantt.model.treetable
Class TreeTableModelEvent

java.lang.Object
  extended by java.util.EventObject
      extended by javax.swing.event.TreeModelEvent
          extended by com.dlsc.flexgantt.model.treetable.TreeTableModelEvent
All Implemented Interfaces:
java.io.Serializable

public class TreeTableModelEvent
extends javax.swing.event.TreeModelEvent

An event object used to notify the application if the user edited a tree table cell.

Since:
1.0
Author:
Dirk Lemmermann
See Also:
ITreeTableModelListener, ITreeTableModel.addTreeTableModelListener(ITreeTableModelListener), Serialized Form

Field Summary
 
Fields inherited from class javax.swing.event.TreeModelEvent
childIndices, children, path
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
TreeTableModelEvent(ITreeTableModel model, java.lang.Object[] path, java.lang.Object oldValue, java.lang.Object newValue, int modelIndex)
          Constructs a new model event.
TreeTableModelEvent(ITreeTableModel model, javax.swing.tree.TreePath path, java.lang.Object oldValue, java.lang.Object newValue, int modelIndex)
          Constructs a new model event.
 
Method Summary
 ITreeTableModel getModel()
          Returns the tree table model from which the event originated.
 int getModelIndex()
          Returns the model index of the tree table column where the value of a cell was edited.
 java.lang.Object getNewValue()
          Returns the new value for the edited tree table cell.
 java.lang.Object getOldValue()
          Returns the old value of the edited tree table cell.
 java.lang.String toString()
           
 
Methods inherited from class javax.swing.event.TreeModelEvent
getChildIndices, getChildren, getPath, getTreePath
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TreeTableModelEvent

public TreeTableModelEvent(ITreeTableModel model,
                           java.lang.Object[] path,
                           java.lang.Object oldValue,
                           java.lang.Object newValue,
                           int modelIndex)
Constructs a new model event.

Parameters:
model - the tree table model where the change happened
path - the object path to the tree node where the event occured
oldValue - the previous value of the table cell
newValue - the new value for the table cell
modelIndex - the model index of the column where the changed happened
Since:
1.0

TreeTableModelEvent

public TreeTableModelEvent(ITreeTableModel model,
                           javax.swing.tree.TreePath path,
                           java.lang.Object oldValue,
                           java.lang.Object newValue,
                           int modelIndex)
Constructs a new model event.

Parameters:
model - the tree table model where the change happened
path - the object path to the tree node where the event occured
oldValue - the previous value of the table cell
newValue - the new value for the table cell
modelIndex - the model index of the column where the changed happened
Since:
1.0
Method Detail

getModel

public ITreeTableModel getModel()
Returns the tree table model from which the event originated.

Returns:
the tree table model that was the source of the event
Since:
1.0

getNewValue

public java.lang.Object getNewValue()
Returns the new value for the edited tree table cell.

Returns:
the new value of the edited cell
Since:
1.0

getOldValue

public java.lang.Object getOldValue()
Returns the old value of the edited tree table cell.

Returns:
the old value of the edited cell
Since:
1.0

getModelIndex

public int getModelIndex()
Returns the model index of the tree table column where the value of a cell was edited.

Returns:
the column's model index
Since:
1.0

toString

public java.lang.String toString()
Overrides:
toString in class javax.swing.event.TreeModelEvent