gui.ClientAppViewController - rsanchez-wsu/jfiles GitHub Wiki
This class is the controller for the main client application view.
Package: gui
Implements: Initializable, ClipboradOwner
- 'private enum Operation' - Type for storing last operation.
- 'static final Logger Logger' - gets logger for the ClientAppViewController.
Private:
- 'SocketClient client' - Default value NULL.
- 'FileStruct selectedFile' - Default value NULL.
- 'String currentDirectory' - Default value NULL.
- 'Map<FileStruct, Parent> contents' - Default value NULL.
- 'Operation lastOperation' - Default value NULL.
- 'Clipboard clipboard' - Default value NULL.
- 'ContextMenu fileContextMenu' - Default value NULL.
- 'ContextMenu viewContextMenu' - Default value NULL.
Public:
- '@FXML BorderPane root' - Default value NULL.
- '@FXML TreeView treeView' - Default value NULL.
- '@FXML FlowPane flowPane' - Default value NULL.
Clears the view
Parameters:
- 'path' - the path to load.
Loads the given directory into the view.
Parameters:
- 'fs' - fileStruct to set.
Sets the current selected file.
Builds a context menu for files, returns a context menu.
Builds a context menu for main view, returns a context menu.
Conducts the cut operation.
Conducts the copy operation.
Conducts the paste operation.
Conducts the delete operation.
Handles mouse clicks in the flowPane.
Parameters:
- 'event' - A drag event.
Handles dragging files over the view.
Parameters:
- 'event' - A drag event.
Handles dropping files on the view.
Parameters:
- 'event' - The event.
Context menu requested action.
Parameters:
- 'location' -
- 'resources' - resources for initialization of the app view.
Initializes the app view.
Parameters:
- 'clipboard' - clipboard used for cut,copy, and paste operations.
- 'transferable'
Handles losing ownership of the clipboard NOTE: this is required for the ClipboardOwner interface.