Class cam.visuals.dialogs.RemoteFileDialog

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Dialog
                                   |
                                   +----cam.visuals.dialogs.RemoteFileDialog

public class RemoteFileDialog
extends Dialog
Provides a selection dialog for files on a remote system. The dialog is used in conjunction with the RemoteFileUtility class and it's associated classes RemoteFileUtilityIf, RemoteFileUtilityCI and RemoteFileUtilitySI. For local use one requires RemoteFileUtility and RemoteFileUtilityIf. For distributed implementations, the following table gives the files and their locations

File Locations

Local

Remote

RemoteFileDialog  
RemoteFileUtilityIf RemoteFileUtility
RemoteFileUtilityCI RemoteFileUtilitySI

Typical use of the dialog invocation is

RemoteFileDialog RFD = new RemoteFileDialog(this, true);
try{RFD.setConnection("127.0.0.1",6789);}
catch(Exception e)
{System.out.println("Remote System Unavailable");}
RFD.setVisible(true);
System.out.println(RFD.getDirectory());
System.out.println(RFD.getFile());

Version:
Oct. 15, 1998
Author:
Chris Anderson (C) UCLA 1998

Constructor Index

 o RemoteFileDialog(Frame, boolean)
 o RemoteFileDialog(Frame, String, boolean)

Method Index

 o addNotify()
 o getDirectory()
Returns the current directory.
 o getFile()
Returns the name of the selected file.
 o getSeparator()
Returns the remote file system file separator.
 o setConnection()
Creates a "local" connection to the RemoteFileUtility class.
 o setConnection(String, int)
Creates a connection to a remote machine instance of the RemoteFileUtility class.
 o setDirectory(String)
Sets the directory of the dialog.
 o setVisible(boolean)
Shows or hides the component depending on the boolean flag b.

Constructors

 o RemoteFileDialog
 public RemoteFileDialog(Frame parent,
                         boolean modal)
 o RemoteFileDialog
 public RemoteFileDialog(Frame parent,
                         String title,
                         boolean modal)

Methods

 o setConnection
 public void setConnection() throws Exception
Creates a "local" connection to the RemoteFileUtility class.

Throws: Exception
if RemoteFileUtility class is not found in the classpath.
 o setConnection
 public void setConnection(String remoteAddress,
                           int remotePort) throws Exception
Creates a connection to a remote machine instance of the RemoteFileUtility class.

Parameters:
remoteAddress - Machine host name or IP address where an instance of cam.netapp.ServerManager is running.
remotePort - Port that the cam.netapp.ServerManager is associated with.
Throws: Exception
if the connection is not responding, or the remote RemoteFileUtility class is not found in the cam.netapp.ServerManaager classpath.
 o getFile
 public String getFile()
Returns the name of the selected file. If no file is selected (or the window is closed or cancel has been hit) then null is returned.

 o getDirectory
 public String getDirectory()
Returns the current directory. The specification of the directory does not contain a trailing file separator; thus providing the same functionality as the getDirectory() method of the java.awt.FileDialog class.

 o setDirectory
 public void setDirectory(String S)
Sets the directory of the dialog.

 o getSeparator
 public String getSeparator()
Returns the remote file system file separator.

 o addNotify
 public void addNotify()
Overrides:
addNotify in class Dialog
 o setVisible
 public void setVisible(boolean b)
Shows or hides the component depending on the boolean flag b.

Parameters:
b - if true, show the component; otherwise, hide the component.
Overrides:
setVisible in class Component
See Also:
isVisible