All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.install.panels.RemoteFileBrowser

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Dialog
                                   |
                                   +----com.sun.install.panels.RemoteFileBrowser

public class RemoteFileBrowser
extends Dialog
implements ActionListener, ItemListener
Dialog used for browsing a file system. Very similar to a FileDialog, except its contents come from another object implementing the FileBrowser interface, rather than the local filesystem.


Constructor Index

 o RemoteFileBrowser(Frame, FileBrowser, String, boolean)
Creates a new RemoteFileBrowser.

Method Index

 o actionPerformed(ActionEvent)
Used by the files list and directory list to change the selection box when the user double-clicks on a file.
 o browse()
Causes this file browser to become visible.
 o getDirectory()
Gets the current directory this browser is browsing.
 o itemStateChanged(ItemEvent)
Used by the files list to change the selection box when the user single-clicks on a file.
 o setDirectory(String)
Sets the current directory this browser is browsing.

Constructors

 o RemoteFileBrowser
 public RemoteFileBrowser(Frame parent,
                          FileBrowser browser,
                          String startDirectory,
                          boolean modal)
Creates a new RemoteFileBrowser. use setVisible(true) to show it

Parameters:
parent - The parent frame.
browser - The object that knows how to retrieve lists of files for this browser.
startDirectory - The initial directory to display. If this directory does not actually exist, the file system tree is walked backwards towards the root directory until a directory is found that exists.
modal - Whether this dialog is modal or not.

Methods

 o getDirectory
 public String getDirectory()
Gets the current directory this browser is browsing. Useful once the user presses OK to get the directory they selected.

Returns:
The current directory that this dialog is browsing.
 o setDirectory
 public void setDirectory(String directory)
Sets the current directory this browser is browsing. The listing is updated before this method returns.

Parameters:
directory - The directory to make the current directory.
 o itemStateChanged
 public void itemStateChanged(ItemEvent e)
Used by the files list to change the selection box when the user single-clicks on a file. Single-clicking on a directory has no effect.

Parameters:
e - The event that caused the state to change.
 o browse
 public boolean browse()
Causes this file browser to become visible. This method blocks until the user clicks one of the buttons to finish browsing. true is returned if the user selected OK, otherwise false is returned. Callers can then use getDirectory() to retrieve what the user selected, whether they pressed OK or CANCEL.

 o actionPerformed
 public void actionPerformed(ActionEvent e)
Used by the files list and directory list to change the selection box when the user double-clicks on a file. Single-clicking on a directory has no effect.

Parameters:
e - The event that caused the state to change.

All Packages  Class Hierarchy  This Package  Previous  Next  Index