All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.install.panels.DirBrowser

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

public class DirBrowser
extends Dialog
implements Observer, ActionListener, ItemListener
This class is a browser for browsing directories. On Windows-based systems, it also presents a Drive selection drop-down list.


Constructor Index

 o DirBrowser(Frame, String, FileBrowser)
Creates a DirBrowser with specified parent Frame, title, and FileBrowser object which supplies file lists for directories, and other operations.
 o DirBrowser(Frame, String, String, FileBrowser)
Creates a DirBrowser with specified parent Frame, title, initial directory, and FileBrowser object which supplies file lists for directories, and other operations.

Method Index

 o actionPerformed(ActionEvent)
 o dirName()
Gets name of directory we are currently browsing.
 o getInsets()
Creates space around dialog content -- a better way to handle this would be to use a panel with its own insets.
 o itemStateChanged(ItemEvent)
 o processWindowEvent(WindowEvent)
 o run()
After creating the DirBrowser, you should call this method when you are ready to present the Dialog.
 o setInitialDirectory(String)
Sets directory to browse.
 o update(Observable, Object)
Updates display for this dialog

Constructors

 o DirBrowser
 public DirBrowser(Frame parent,
                   String title,
                   FileBrowser fb)
Creates a DirBrowser with specified parent Frame, title, and FileBrowser object which supplies file lists for directories, and other operations.

Parameters:
parent - The parent Frame
title - The dialog title.
fb - The FileBrowser object to server lists.
See Also:
FileBrowser
 o DirBrowser
 public DirBrowser(Frame parent,
                   String title,
                   String initialDir,
                   FileBrowser fb)
Creates a DirBrowser with specified parent Frame, title, initial directory, and FileBrowser object which supplies file lists for directories, and other operations.

Parameters:
parent - The parent Frame
title - The dialog title.
initialDir - The initial directory to browse.
fb - The FileBrowser object to server lists.
See Also:
FileBrowser

Methods

 o setInitialDirectory
 public void setInitialDirectory(String initialDir) throws Exception
Sets directory to browse.

Parameters:
initialDir - The directory to browse.
 o dirName
 public synchronized String dirName()
Gets name of directory we are currently browsing.

Returns:
The name of directory we are currently browsing.
 o getInsets
 public synchronized Insets getInsets()
Creates space around dialog content -- a better way to handle this would be to use a panel with its own insets.

Returns:
The insets for this browser.
Overrides:
getInsets in class Container
 o itemStateChanged
 public void itemStateChanged(ItemEvent e)
 o actionPerformed
 public synchronized void actionPerformed(ActionEvent e)
 o processWindowEvent
 protected synchronized void processWindowEvent(WindowEvent e)
Overrides:
processWindowEvent in class Window
 o run
 public void run()
After creating the DirBrowser, you should call this method when you are ready to present the Dialog. It in turn calls show(), and as such, blocks until the user clicks OK.

 o update
 public synchronized void update(Observable o,
                                 Object arg)
Updates display for this dialog

Parameters:
o - The Observable object observing this dialog
arg - The argument for this update.

All Packages  Class Hierarchy  This Package  Previous  Next  Index