org.sbml.jsbml.util
public class SimpleTreeNodeChangeListener extends java.lang.Object implements TreeNodeChangeListener
TreeNodeChangeListener
writes
all the events to the standard out stream.Modifier and Type | Field and Description |
---|---|
private org.apache.log4j.Logger |
logger
A
Logger for this class. |
Constructor and Description |
---|
SimpleTreeNodeChangeListener()
Creates an
TreeNodeChangeListener that writes all events to the
standard output. |
Modifier and Type | Method and Description |
---|---|
org.apache.log4j.Logger |
getLogger() |
void |
nodeAdded(javax.swing.tree.TreeNode treeNode)
The
TreeNode passed to this method has just been added to the
a containing element. |
void |
nodeRemoved(TreeNodeRemovedEvent evt)
The
TreeNodeRemovedEvent passed to this method provides information
about the node that has been removed from a
containing parent and does hence no longer belong to the
SBMLDocument anymore. |
void |
propertyChange(java.beans.PropertyChangeEvent evt) |
private java.lang.String |
saveToString(java.lang.Object object)
Tries to call the
Object.toString() method on the given object. |
public SimpleTreeNodeChangeListener()
TreeNodeChangeListener
that writes all events to the
standard output.public org.apache.log4j.Logger getLogger()
public void nodeAdded(javax.swing.tree.TreeNode treeNode)
TreeNodeChangeListener
TreeNode
passed to this method has just been added to the
a containing element.nodeAdded
in interface TreeNodeChangeListener
treeNode
- This element is now part of the SBMLDocument
.public void nodeRemoved(TreeNodeRemovedEvent evt)
TreeNodeChangeListener
TreeNodeRemovedEvent
passed to this method provides information
about the node that has been removed from a
containing parent and does hence no longer belong to the
SBMLDocument
anymore. In addition, a pointer to its previous parent
is also provided. In this way, an implementing class
can identify the location within the tree where it was before.nodeRemoved
in interface TreeNodeChangeListener
evt
- The event containing information about the removed TreeNode
.public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange
in interface java.beans.PropertyChangeListener
private java.lang.String saveToString(java.lang.Object object)
Object.toString()
method on the given object. If the
argument is null
, it returns "null". In case that the call of
Object.toString()
fails, the simple class name of the object is returned.object
- String
representation of the given object.