vc.gui.client.handling
Class TreeFunctionalityHandler

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPopupMenu
                          |
                          +--vc.gui.client.handling.TreeFunctionalityHandler
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.MenuElement, java.io.Serializable

public class TreeFunctionalityHandler
extends javax.swing.JPopupMenu

TreeFunctionalityHandler is the mediator(pattern) class that creates the GUI for popup menu for the directories(in a tree), then set the event handlers and finally doing the actual event handling processing.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JPopupMenu
javax.swing.JPopupMenu.AccessibleJPopupMenu, javax.swing.JPopupMenu.Separator
 
Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Inner classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
Field Summary
 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
 TreeNode popupNode
          TreeNode object which represents the data and behaviour of projects/directories in the tree.
 ProjectDBManager projectDBManager
          Reference to the CORBA implementaion for the IDL interface ProjectDBHandler
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
TreeFunctionalityHandler(ProjectDBManager projectDBManager, FileVersionManager fileVersionManager, javax.swing.JTree tree, FileTableManipulator fileTableManipulator, TreeManipulator treeManipulator)
          Construct and Initializes the TreeFunctionalityHandler object from the parameters
 
Method Summary
 void addEventHandlers()
          adds the event handlers to the menu items related to the popup menu hendler for the dirctories
 void popupSelected(java.awt.event.ActionEvent event)
          Registered Event Handler method whch will be invoked when ever the popup menuitem is clicked/selected.
 void prepareForChildNode()
          Prepares the menu items for displaying the non-root/child node of the tree by showing and hiding the menu items selectively
 void prepareForRootNode()
          Prepares the menu items for displaying the root node of the tree by showing and hiding the menu items selectively
 void selected_AddLabel()
          Handles the request to add labels for the directory and its children .
 void selected_AddNewDirectory()
          Handles the request to add a directory and its children to the directory.
 void selected_AddNewFile()
          Handles the request to add a file to the directory.
 void selected_AddNewProject()
          Handles the request to add the directories.
 void selected_CheckInProject()
          Handles the request to check in the directory and its children .
 void selected_CheckOutProject()
          Handles the request to check out the directory and its children .
 void selected_GetLatestProjectVersion()
          Handles the request to get the latest version of the directory and its children .
 void selected_History()
          Handles the request to show the versions and labels of the directory and its children .
 void selected_MapToDirectory()
          Handles the request to map the filesystem directory to the directory.
 void selected_RemoveProject()
          Handles the request to remove the directory.
 void selected_RenameProject()
          Handles the request to rename a directory.
 void selected_UndoCheckOutProject()
          Handles the request to undo check out the directory and its children .
 
Methods inherited from class javax.swing.JPopupMenu
add, add, add, addPopupMenuListener, addSeparator, createActionChangeListener, createActionComponent, firePopupMenuCanceled, firePopupMenuWillBecomeInvisible, firePopupMenuWillBecomeVisible, getAccessibleContext, getComponent, getComponentAtIndex, getComponentIndex, getDefaultLightWeightPopupEnabled, getInvoker, getLabel, getMargin, getSelectionModel, getSubElements, getUI, getUIClassID, insert, insert, isBorderPainted, isLightWeightPopupEnabled, isPopupTrigger, isVisible, menuSelectionChanged, pack, paintBorder, paramString, processKeyEvent, processKeyEvent, processMouseEvent, remove, removePopupMenuListener, setBorderPainted, setDefaultLightWeightPopupEnabled, setInvoker, setLabel, setLightWeightPopupEnabled, setLocation, setPopupSize, setPopupSize, setSelected, setSelectionModel, setUI, setVisible, show, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

popupNode

public TreeNode popupNode
TreeNode object which represents the data and behaviour of projects/directories in the tree.

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

fileTableManipulator

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

TreeFunctionalityHandler

public TreeFunctionalityHandler(ProjectDBManager projectDBManager,
                                FileVersionManager fileVersionManager,
                                javax.swing.JTree tree,
                                FileTableManipulator fileTableManipulator,
                                TreeManipulator treeManipulator)
Construct and Initializes the TreeFunctionalityHandler object from the parameters
Parameters:
projectDBManager - to initialize the field projectDBManager
fileVersionManager - to initialize the field fileVersionManager
tree - to initialize the field tree
fileTableManipulator - to initialize the field fileTableManipulator
treeManipulator - to initialize the field treeManipulator
Method Detail

addEventHandlers

public void addEventHandlers()
adds the event handlers to the menu items related to the popup menu hendler for the dirctories

prepareForRootNode

public void prepareForRootNode()
Prepares the menu items for displaying the root node of the tree by showing and hiding the menu items selectively

prepareForChildNode

public void prepareForChildNode()
Prepares the menu items for displaying the non-root/child node of the tree by showing and hiding the menu items selectively

popupSelected

public void popupSelected(java.awt.event.ActionEvent event)
Registered Event Handler method whch will be invoked when ever the popup menuitem is clicked/selected. It delegates to diffrent methods based upon the menuitem on which the action happened.
Parameters:
e - ActionEvent which represents the information abou the action, target component, location etc.

selected_AddNewProject

public void selected_AddNewProject()
Handles the request to add the directories. Shows a simple message box asking the name of the directory that is to be deleated really.

selected_RenameProject

public void selected_RenameProject()
Handles the request to rename a directory. Shows a simple message box asking for the new name for the directory and renames it.

selected_RemoveProject

public void selected_RemoveProject()
Handles the request to remove the directory. Shows a simple message box asking to to confirm if the directory is to be deleated really.

selected_AddNewFile

public void selected_AddNewFile()
Handles the request to add a file to the directory. Shows a dialog box asking to select the filesystem file to be added to the directory.

selected_AddNewDirectory

public void selected_AddNewDirectory()
Handles the request to add a directory and its children to the directory. Shows a dialog box asking to select the filesystem directory to be added to the directory.

selected_MapToDirectory

public void selected_MapToDirectory()
Handles the request to map the filesystem directory to the directory. Shows a simple dialog that takes the file system directory to which the directory is to be mapped.

selected_CheckInProject

public void selected_CheckInProject()
Handles the request to check in the directory and its children . Shows a simple dialog that takes the options for checking in the directory and its children.

selected_CheckOutProject

public void selected_CheckOutProject()
Handles the request to check out the directory and its children . Shows a simple dialog that takes the options for checking out the directory and its children.

selected_GetLatestProjectVersion

public void selected_GetLatestProjectVersion()
Handles the request to get the latest version of the directory and its children . Shows a simple dialog that takes the options for getting the latest version of the directory and its children.

selected_UndoCheckOutProject

public void selected_UndoCheckOutProject()
Handles the request to undo check out the directory and its children . Shows a simple dialog that takes the options for undo checking out the directory and its children.

selected_AddLabel

public void selected_AddLabel()
Handles the request to add labels for the directory and its children . Shows a simple message asking the label name for adding label for the directory and its children.

selected_History

public void selected_History()
Handles the request to show the versions and labels of the directory and its children . Shows a simple dialog that takes the options for for showing the the versions and labels of the directory and its children.