SPT Core API

com.sptci.epng.editabletree
Class DeleteListener

java.lang.Object
  extended by com.sptci.epng.editabletree.Listener
      extended by com.sptci.epng.editabletree.DeleteListener
All Implemented Interfaces:
Serializable, EventListener, ActionListener

public class DeleteListener
extends Listener

The default action listener used to delete a selected node.

&coopy; Copyright 2007 Sans Pareil Technologies, Inc.

Version:
$Id: DeleteListener.java 4553 2008-12-24 10:34:16Z rakesh $
Author:
Rakesh Vidyadharan 2007-05-05
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.sptci.epng.editabletree.Listener
app, logger
 
Constructor Summary
DeleteListener()
           
 
Method Summary
protected  void removeNode(DefaultMutableTreeNode treeNode, Node node)
          Remove the tree node that contains the specified node.
protected  Treeable updateStore(Node node)
          Delete the Treeable instance represented by the node specified from the JDO data store.
protected  void updateView(Node node, Treeable treeable)
          Update the tree model with a new node representing the newly created treeable object.
 
Methods inherited from class com.sptci.epng.editabletree.Listener
actionPerformed, getFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeleteListener

public DeleteListener()
Method Detail

updateStore

protected Treeable updateStore(Node node)
Delete the Treeable instance represented by the node specified from the JDO data store.

Specified by:
updateStore in class Listener
Parameters:
node - The node that represents the object that is to be deleted.
Returns:
The model object that was updated in the data store.

updateView

protected void updateView(Node node,
                          Treeable treeable)
Update the tree model with a new node representing the newly created treeable object.

Specified by:
updateView in class Listener
Parameters:
node - The node that is to be deleted from the tree.
treeable - The model object that is represented by the node.
See Also:
removeNode(echopointng.tree.DefaultMutableTreeNode, com.sptci.epng.editabletree.Node)

removeNode

protected void removeNode(DefaultMutableTreeNode treeNode,
                          Node node)
Remove the tree node that contains the specified node.

Parameters:
treeNode - The tree node that is to be deleted if appropriate.
node - The userObject in the tree node that is to be deleted.

SPT Core API