Main Page Cookbook/Overview ImageMeister the jcprops file Licensing Binary Installation & Configuration [ Win · Mac · Nix ] Changes Public API Source Code Main Page Java [ Common · Win · Mac · Nix ] Native Code [ Common · Win · Mac · Nix ] Manifest Native Code Overviews [ Common · Win · Mac · Nix · Strings ] Macros [ General · Native Macros ] Walkthroughs [ Java only · Java and native ] Building [ Win · Mac · Nix ] Distribution Issues

    All Packages  This Package  Class Hierarchy  Class Search  Index

Class com.tolstoy.imagemeister.Browser

    java.lang.Object
       |
       +----com.tolstoy.imagemeister.Browser

Summary

    class  Browser
         extends java.lang.Object
         implements com.tolstoy.imagemeister.BrowserDisplayOwnerI,
                    com.tolstoy.imagemeister.WindowOwner,
                    com.tolstoy.imagemeister.VisitURLRecipient,
                    com.tolstoy.imagemeister.ImageViewerOwner,
                    com.tolstoy.imagemeister.InfoViewerOwner,
                    com.tolstoy.imagemeister.DDCommandRecipient
    {
              // Fields 18
         private AboutBox about;
         private boolean bShowAllFiles;
         private boolean bShowInNewWindow;
         private static final String copyright;
         private DiskObject currentContainer;
         private String dataFolder;
         private BrowserDisplay display;
         private DDSource ees;
         private static final String kDDSinkFileName;
         private static final String kDDSourceFileName;
         private static final String kFactoriesFileName;
         private static final String kImageFolderName;
         private static final int kMaxFilesToShow;
         private static final int kStandardFilterFlags;
         private static final String kTopLevelTextString;
         private static final String kURLString;
         private Vector theImageViewers;
         private Vector theInfoViewers;

              // Constructors 1
         Browser(String);

              // Methods 22
         public void browserButtonClicked(int);
         public void browserCloseButtonClicked();
         public void browserItemClicked(int);
         public boolean browserKeyPressed(int, int);
         public void closeImageViewer(ImageViewerI);
         public void closeInfoViewer(InfoViewerI);
         public void closeWindow(Window);
         private void doAboutButton();
         private void doInfoButton();
         private void doNewWindowCheckbox();
         private void doQuitButton();
         private void doShowAllFilesCheckbox();
         private void doShowButton();
         void doUpALevelButton();
         boolean openDDSink(String);
         boolean openDDSource(String);
         public boolean processEvent(Event);
         public void refreshCurrentDisplay();
         private void showImageViewerForFile(DiskObject);
         private void showInfoViewerForFile(DiskObject);
         void tryToSetAsContainer(DiskObject);
         public void visitURLButtonClicked();
    }

This is the main class. It owns a BrowserDisplay object which represents the GUI portion. It owns the image and info viewers currently displayed, and it keeps these two sets of viewers in separate vectors. This class directs which objects are shown in the main window in response to user actions. This class implements the BrowserDisplayOwnerI interface, and as the user clicks buttons and objects in the GUI, methods of this object are called back by the BrowserDisplay object. This class implements the VisitURLRecipient interface; when the visitURLButtonClicked() method is called, we launch the URL 'kURLString' in the user's browser. You'll probably call this method in your about box, and you'll probably want to go to your own URL. This class implements the DDCommandRecipient interface, so we can accept commands from external programs, such as our shell app. This class implements the ImageViewerOwner and InfoViewerOwner interfaces, which lets this class know when image and info viewers are cloaed.

Author:
  Copyright (c) 1997,1998,1999,2000 Samizdat Productions. All Rights Reserved.

Fields

### · copyright | Summary | Top

       private static final String copyright

### · kURLString | Summary | Top

       private static final String kURLString

### · kFactoriesFileName | Summary | Top

       private static final String kFactoriesFileName

### · kImageFolderName | Summary | Top

       private static final String kImageFolderName

### · kTopLevelTextString | Summary | Top

       private static final String kTopLevelTextString

### · kDDSinkFileName | Summary | Top

       private static final String kDDSinkFileName

### · kDDSourceFileName | Summary | Top

       private static final String kDDSourceFileName

### · kMaxFilesToShow | Summary | Top

       private static final int kMaxFilesToShow

### · kStandardFilterFlags | Summary | Top

       private static final int kStandardFilterFlags

### · about | Summary | Top

       private AboutBox about

### · display | Summary | Top

       private BrowserDisplay display

### · ees | Summary | Top

       private DDSource ees

### · theImageViewers | Summary | Top

       private Vector theImageViewers

### · theInfoViewers | Summary | Top

       private Vector theInfoViewers

### · currentContainer | Summary | Top

       private DiskObject currentContainer

### · dataFolder | Summary | Top

       private String dataFolder

### · bShowInNewWindow | Summary | Top

       private boolean bShowInNewWindow

### · bShowAllFiles | Summary | Top

       private boolean bShowAllFiles

Constructors

### · Browser | Summary | Top

       Browser(String df)

> Create the BrowserDisplay object, and start out by showing the mounted volumes.

> Parameter | Description
> df | full path to ImageMeister's 'data' folder

Methods

### · openDDSink | Summary | Top

       boolean openDDSink(String eePath)

### · openDDSource | Summary | Top

       boolean openDDSource(String eePath)

### · visitURLButtonClicked | Summary | Top

       public void visitURLButtonClicked()

> Called when the About Box's URL button is clicked.

> Implements:
>   visitURLButtonClicked in interface VisitURLRecipient

### · closeImageViewer | Summary | Top

       public void closeImageViewer(ImageViewerI viewer)

> From the ImageViewerOwner interface.

> Implements:
>   closeImageViewer in interface ImageViewerOwner

### · closeInfoViewer | Summary | Top

       public void closeInfoViewer(InfoViewerI viewer)

> From the InfoViewerOwner interface.

> Implements:
>   closeInfoViewer in interface InfoViewerOwner

### · closeWindow | Summary | Top

       public void closeWindow(Window w)

> From the WindowOwner interface.

> Implements:
>   closeWindow in interface WindowOwner

### · processEvent | Summary | Top

       public boolean processEvent(Event e)

> Handle commands sent from the DDSource class.

> Implements:
>   processEvent in interface DDCommandRecipient

### · browserCloseButtonClicked | Summary | Top

       public void browserCloseButtonClicked()

> Implements:
>   browserCloseButtonClicked in interface BrowserDisplayOwnerI

### · doQuitButton | Summary | Top

       private void doQuitButton()

### · doAboutButton | Summary | Top

       private void doAboutButton()

### · doShowButton | Summary | Top

       private void doShowButton()

> Display the currently selected object.

### · doInfoButton | Summary | Top

       private void doInfoButton()

> Display info about the currently selected object.

### · doShowAllFilesCheckbox | Summary | Top

       private void doShowAllFilesCheckbox()

### · doNewWindowCheckbox | Summary | Top

       private void doNewWindowCheckbox()

### · doUpALevelButton | Summary | Top

       void doUpALevelButton()

> Show the parent folder of the current folder.

### · browserItemClicked | Summary | Top

       public void browserItemClicked(int which)

> From the BrowserDisplayOwnerI interface. The user clicked one of the disk objects; if it's a volume or directory, show its contents. Otherwise, it's a file, so try to show an image viewer for the file.

> Implements:
>   browserItemClicked in interface BrowserDisplayOwnerI

### · browserKeyPressed | Summary | Top

       public boolean browserKeyPressed(int which,
                                        int key)

> Implements:
>   browserKeyPressed in interface BrowserDisplayOwnerI

### · showImageViewerForFile | Summary | Top

       private void showImageViewerForFile(DiskObject dobj)

> Try to display 'dobj'

### · showInfoViewerForFile | Summary | Top

       private void showInfoViewerForFile(DiskObject dobj)

> Try to display info about 'dobj'

### · refreshCurrentDisplay | Summary | Top

       public void refreshCurrentDisplay()

> Update the display. If we're at the top level, use the FileRegistry to get a list of the mounted volumes.

### · tryToSetAsContainer | Summary | Top

       void tryToSetAsContainer(DiskObject newContainer)

> Try to set the given object as the current container. First, we try to iterate on its contents; if that fails ( e.g., if it's a file ), we do nothing. Otherwise, set the current container, and initialize the panels with the contents of the current container.

### · browserButtonClicked | Summary | Top

       public void browserButtonClicked(int which)

> From the BrowserDisplayOwnerI interface.

> Implements:
>   browserButtonClicked in interface BrowserDisplayOwnerI

    All Packages  This Package  Class Hierarchy  Class Search  Index

Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7