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
-
RemoteFileDialog(Frame, boolean)
-
-
RemoteFileDialog(Frame, String, boolean)
-
-
addNotify()
-
-
getDirectory()
- Returns the current directory.
-
getFile()
- Returns the name of the selected file.
-
getSeparator()
- Returns the remote file system file separator.
-
setConnection()
-
Creates a "local" connection to the RemoteFileUtility class.
-
setConnection(String, int)
- Creates a connection to a remote machine instance of the
RemoteFileUtility class.
-
setDirectory(String)
- Sets the directory of the dialog.
-
setVisible(boolean)
- Shows or hides the component depending on the boolean flag b.
RemoteFileDialog
public RemoteFileDialog(Frame parent,
boolean modal)
RemoteFileDialog
public RemoteFileDialog(Frame parent,
String title,
boolean modal)
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.
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.
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.
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.
setDirectory
public void setDirectory(String S)
- Sets the directory of the dialog.
getSeparator
public String getSeparator()
- Returns the remote file system file separator.
addNotify
public void addNotify()
- Overrides:
- addNotify in class Dialog
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