vc.gui.client.handling
Class MenuHandler

java.lang.Object
  |
  +--vc.gui.client.handling.MenuHandler
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class MenuHandler
extends java.lang.Object
implements java.awt.event.ActionListener

MenuHandler is the event handling class for the MainFrame menu classs having the operations related to both directories and files. It delegates the event handling to different actual event handlers.


Constructor Summary
MenuHandler(ClientFrame clientFrame)
          Constructs and initializes the object from the parameters.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Event handler for menu item selection.
 void hideUnSupportedOperations()
          A temporary method that hides the menu items related to the unsupported operations.
 void initializeMenuElements()
          Initializes the menu items, adds them to the menu objects and adds the event handlers for the menu items
 void processMenuItemSelection(java.awt.event.ActionEvent e)
          Event handler for menu item selection.
 void selected_About()
          To be implemented in future versions.
 void selected_AddDirectories()
          Handles the request to add directory to a project/directory.
 void selected_AddFiles()
          Handles the request to add files to a project/directory.
 void selected_CancelSearch()
          To be implemented in future versions.
 void selected_ChangePassword()
          To be implemented in future versions.
 void selected_CheckIn()
          Handles the request to checkin a file or files of a project/directory.
 void selected_CheckOut()
          Handles the request to checkout a file or files of a project/directory.
 void selected_Contents()
          To be implemented in future versions.
 void selected_Copy()
          To be implemented in future versions.
 void selected_CreateProject()
          Handles the request to create a project/directory.
 void selected_CustomizeToolbar()
          To be implemented in future versions.
 void selected_Cut()
          To be implemented in future versions.
 void selected_Delete()
          Handles the request to delete a file or a project/directory.
 void selected_EditFile()
          To be implemented in future versions.
 void selected_Exit()
          Handles the request to terminate this application.
 void selected_FindInFiles()
          To be implemented in future versions.
 void selected_Font()
          To be implemented in future versions.
 void selected_GetLatestVersion()
          Handles the request to get latest version of a file or for files of a project/directory.
 void selected_InvertSelection()
          To be implemented in future versions.
 void selected_Label()
          Handles the request to create a label for a file or a project/directory.
 void selected_OnTheWeb()
          To be implemented in future versions.
 void selected_OpenSourceDatabase()
          To be implemented in future versions.
 void selected_Options()
          To be implemented in future versions.
 void selected_Paste()
          To be implemented in future versions.
 void selected_Properties()
          To be implemented in future versions.
 void selected_Refresh()
          To be implemented in future versions.
 void selected_Rename()
          Handles the request to rename a file.
 void selected_Search()
          To be implemented in future versions.
 void selected_Select()
          To be implemented in future versions.
 void selected_SelectAll()
          To be implemented in future versions.
 void selected_SetWorkingFolder()
          Handles the request to map an filesystem directory to a project/directory.
 void selected_ShowDiffereneces()
          To be implemented in future versions.
 void selected_ShowHistory()
          Handles the request to show versions and labels of a file or files of a project/directory.
 void selected_Sort()
          To be implemented in future versions.
 void selected_UndoCheckOut()
          Handles the request to undo checkout a file or files of a project/directory.
 void selected_View()
          To be implemented in future versions.
 void showForFiles(int numSelected)
          Changes the MainFrame menu options to show the MainFrame menu according to the number of files selected in the table.
 void showForProjects(int numSelected)
          Changes the menu MainFrame options to show the MainFrame menu according to the number of directoies selected in the table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MenuHandler

public MenuHandler(ClientFrame clientFrame)
Constructs and initializes the object from the parameters.
Parameters:
clientFrame - for initializing the field clientFrame and others
Method Detail

initializeMenuElements

public void initializeMenuElements()
Initializes the menu items, adds them to the menu objects and adds the event handlers for the menu items

hideUnSupportedOperations

public void hideUnSupportedOperations()
A temporary method that hides the menu items related to the unsupported operations. This willbe removed in the future implementations.

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Event handler for menu item selection. It delegates the menu selection handling to processMenuItemSelection() method
Specified by:
actionPerformed in interface java.awt.event.ActionListener

processMenuItemSelection

public void processMenuItemSelection(java.awt.event.ActionEvent e)
Event handler for menu item selection. It delegates the menu selection handling to processMenuItemSelection() method

showForFiles

public void showForFiles(int numSelected)
Changes the MainFrame menu options to show the MainFrame menu according to the number of files selected in the table.
Parameters:
numSelected - number of files selected in the table

showForProjects

public void showForProjects(int numSelected)
Changes the menu MainFrame options to show the MainFrame menu according to the number of directoies selected in the table.
Parameters:
numSelected - number of directoies selected in the table

selected_OpenSourceDatabase

public void selected_OpenSourceDatabase()
To be implemented in future versions.

selected_CreateProject

public void selected_CreateProject()
Handles the request to create a project/directory. Delegates to TreeFunctionalityHandler method.

selected_AddFiles

public void selected_AddFiles()
Handles the request to add files to a project/directory. Delegates to TreeFunctionalityHandler method.

selected_AddDirectories

public void selected_AddDirectories()
Handles the request to add directory to a project/directory. Delegates to TreeFunctionalityHandler method.

selected_Delete

public void selected_Delete()
Handles the request to delete a file or a project/directory. Delegates to TablePopupHandler/TreeFunctionalityHandler methods.

selected_Rename

public void selected_Rename()
Handles the request to rename a file. Delegates to TablePopupHandler method.

selected_Properties

public void selected_Properties()
To be implemented in future versions.

selected_SetWorkingFolder

public void selected_SetWorkingFolder()
Handles the request to map an filesystem directory to a project/directory. Delegates to TreeFunctionalityHandler method.

selected_Label

public void selected_Label()
Handles the request to create a label for a file or a project/directory. Delegates to TablePopupHandler/TreeFunctionalityHandler methods.

selected_Exit

public void selected_Exit()
Handles the request to terminate this application. Delegates to ClientFrame method.

selected_EditFile

public void selected_EditFile()
To be implemented in future versions.

selected_Cut

public void selected_Cut()
To be implemented in future versions.

selected_Copy

public void selected_Copy()
To be implemented in future versions.

selected_Paste

public void selected_Paste()
To be implemented in future versions.

selected_Select

public void selected_Select()
To be implemented in future versions.

selected_SelectAll

public void selected_SelectAll()
To be implemented in future versions.

selected_InvertSelection

public void selected_InvertSelection()
To be implemented in future versions.

selected_View

public void selected_View()
To be implemented in future versions.

selected_Sort

public void selected_Sort()
To be implemented in future versions.

selected_Search

public void selected_Search()
To be implemented in future versions.

selected_CancelSearch

public void selected_CancelSearch()
To be implemented in future versions.

selected_Refresh

public void selected_Refresh()
To be implemented in future versions.

selected_GetLatestVersion

public void selected_GetLatestVersion()
Handles the request to get latest version of a file or for files of a project/directory. Delegates to TablePopupHandler/TreeFunctionalityHandler methods.

selected_CheckIn

public void selected_CheckIn()
Handles the request to checkin a file or files of a project/directory. Delegates to TablePopupHandler/TreeFunctionalityHandler methods.

selected_CheckOut

public void selected_CheckOut()
Handles the request to checkout a file or files of a project/directory. Delegates to TablePopupHandler/TreeFunctionalityHandler methods.

selected_UndoCheckOut

public void selected_UndoCheckOut()
Handles the request to undo checkout a file or files of a project/directory. Delegates to TablePopupHandler/TreeFunctionalityHandler methods.

selected_ShowHistory

public void selected_ShowHistory()
Handles the request to show versions and labels of a file or files of a project/directory. Delegates to TablePopupHandler/TreeFunctionalityHandler methods.

selected_ShowDiffereneces

public void selected_ShowDiffereneces()
To be implemented in future versions.

selected_FindInFiles

public void selected_FindInFiles()
To be implemented in future versions.

selected_Options

public void selected_Options()
To be implemented in future versions.

selected_Font

public void selected_Font()
To be implemented in future versions.

selected_CustomizeToolbar

public void selected_CustomizeToolbar()
To be implemented in future versions.

selected_ChangePassword

public void selected_ChangePassword()
To be implemented in future versions.

selected_Contents

public void selected_Contents()
To be implemented in future versions.

selected_OnTheWeb

public void selected_OnTheWeb()
To be implemented in future versions.

selected_About

public void selected_About()
To be implemented in future versions.