vc.gui.client.handling
Class TreeManipulator

java.lang.Object
  |
  +--vc.gui.client.handling.TreeManipulator

public class TreeManipulator
extends java.lang.Object

TreeManipulator is the event handling class for VersionControl client GUI. It drives the actual GUI classes related to a tree showing the directory hierarchy. It has event handlers and other processing related to the GUI actions.


Field Summary
 ClientFrame clientFrame
          ClientFrame is the reference to the main window of VersionControl client application
static TreeNode dummyNode
          Dummy node which is used for many house kepping operations
 FileTableManipulator fileTableManipulator
          Deals with the visual presentation of the file data of a directory into the table
 FileVersionManager fileVersionManager
          Reference to the CORBA implementaion for the IDL interface FileVersionManager
 ProjectDBManager projectDBManager
          Reference to the CORBA implementaion for the IDL interface ProjectDBHandler
 
Constructor Summary
TreeManipulator(ProjectDBManager projectDBManager, FileVersionManager fileVersionManager)
          Constructs and Initializes TreeManipulator object witht hte parameters passed.
 
Method Summary
 void addDirectoryForCallBack(java.lang.String parentID, Directory newDirectory)
          CallBack method/event handler which will be called when ever the other VersionControl client adds a directory.
 void addEventHandlers(javax.swing.JTree prmTree)
          Adds the event handlers to the tree, some by delegating to other methods and the other by adding directly.
 void deleteDirectoryForCallBack(java.lang.String directoryID)
          CallBack method/event handler which will be called when ever the other VersionControl client deletes a directory.
 TreeNode getRootNode()
          Gets the root node of the project tree
 java.lang.String[] getSelectedDirectoryIDs()
          Gets the IDs of all the directories that are selected
 void nodeCollapsed(javax.swing.event.TreeExpansionEvent event)
          Event handler for event related that node collapsed
 void nodeExpanded(javax.swing.event.TreeExpansionEvent event)
          Event handler for event related that node expanded
 void nodeIsGoingToCollapse(javax.swing.event.TreeExpansionEvent event)
          Event handler for event related that node is going to collapse
 void nodeIsGoingToExpand(javax.swing.event.TreeExpansionEvent event)
          Event handler for event related that node is going to expand
 void nodeSelected(javax.swing.event.TreeSelectionEvent event, javax.swing.tree.DefaultMutableTreeNode node)
          Event handler for event related that node selection
 void unSelectProjects()
          Unselects all the selections made to th directories/projects
 void updateDirectoryForCallBack(Directory newDirectory)
          CallBack method/event handler which will be called when ever the other VersionControl client updates a directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

projectDBManager

public ProjectDBManager projectDBManager
Reference to the CORBA implementaion for the IDL interface ProjectDBHandler

fileVersionManager

public FileVersionManager fileVersionManager
Reference to the CORBA implementaion for the IDL interface FileVersionManager

clientFrame

public ClientFrame clientFrame
ClientFrame is the reference to the main window of VersionControl client application

fileTableManipulator

public FileTableManipulator fileTableManipulator
Deals with the visual presentation of the file data of a directory into the table

dummyNode

public static TreeNode dummyNode
Dummy node which is used for many house kepping operations
Constructor Detail

TreeManipulator

public TreeManipulator(ProjectDBManager projectDBManager,
                       FileVersionManager fileVersionManager)
Constructs and Initializes TreeManipulator object witht hte parameters passed.
Parameters:
projectDBManager - to initialize the field projectDBManager
fileVersionManager - to initialize the field fileVersionManager
Method Detail

getRootNode

public TreeNode getRootNode()
Gets the root node of the project tree
Returns:
Returns the root node of the project tree

addEventHandlers

public void addEventHandlers(javax.swing.JTree prmTree)
Adds the event handlers to the tree, some by delegating to other methods and the other by adding directly.

nodeIsGoingToExpand

public void nodeIsGoingToExpand(javax.swing.event.TreeExpansionEvent event)
Event handler for event related that node is going to expand
Parameters:
event - TreeExpansionEvent which represents the information about the tree expansion

nodeIsGoingToCollapse

public void nodeIsGoingToCollapse(javax.swing.event.TreeExpansionEvent event)
Event handler for event related that node is going to collapse
Parameters:
event - TreeExpansionEvent which represents the information about the tree collapse

nodeExpanded

public void nodeExpanded(javax.swing.event.TreeExpansionEvent event)
Event handler for event related that node expanded
Parameters:
event - TreeExpansionEvent which represents the information about the tree expansion

nodeCollapsed

public void nodeCollapsed(javax.swing.event.TreeExpansionEvent event)
Event handler for event related that node collapsed
Parameters:
event - TreeExpansionEvent which represents the information about the tree collapse

nodeSelected

public void nodeSelected(javax.swing.event.TreeSelectionEvent event,
                         javax.swing.tree.DefaultMutableTreeNode node)
Event handler for event related that node selection
Parameters:
event - TreeExpansionEvent which represents the information about the tree selection
node - Tyhe node that is seleted

addDirectoryForCallBack

public void addDirectoryForCallBack(java.lang.String parentID,
                                    Directory newDirectory)
CallBack method/event handler which will be called when ever the other VersionControl client adds a directory. This method is called because to keep all the clients and servers in synch about the system state. This method will update itself with the data of the newly added directory
Parameters:
parentID - ID of the directory to which the new directory is added
newDirectory - Informatiuon of the new directory that is added

updateDirectoryForCallBack

public void updateDirectoryForCallBack(Directory newDirectory)
CallBack method/event handler which will be called when ever the other VersionControl client updates a directory. This method is called because to keep all the clients and servers in synch about the system state. This method will update itself with the data of the newly updated directory
Parameters:
newDirectory - Informatiuon of the newly updated directory

deleteDirectoryForCallBack

public void deleteDirectoryForCallBack(java.lang.String directoryID)
CallBack method/event handler which will be called when ever the other VersionControl client deletes a directory. This method is called because to keep all the clients and servers in synch about the system state. This method will update itself with the deletion of the directory
Parameters:
directoryID - Id of the directory that is deleted

getSelectedDirectoryIDs

public java.lang.String[] getSelectedDirectoryIDs()
Gets the IDs of all the directories that are selected
Returns:
Returns the IDs of all the directories that are selected

unSelectProjects

public void unSelectProjects()
Unselects all the selections made to th directories/projects