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.
-
RemoteFileBrowser(Frame, FileBrowser, String, boolean)
- Creates a new RemoteFileBrowser.
-
actionPerformed(ActionEvent)
-
Used by the files list and directory list to change the
selection box when the user double-clicks on a file.
-
browse()
- Causes this file browser to become visible.
-
getDirectory()
- Gets the current directory this browser is browsing.
-
itemStateChanged(ItemEvent)
- Used by the files list to change the selection box when the user single-clicks on a file.
-
setDirectory(String)
- Sets the current directory this browser is browsing.
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.
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.
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.
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.
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.
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