All Packages This Package Class Hierarchy Class Search Index
Class com.tolstoy.imagemeister.Browser
java.lang.Object
|
+----com.tolstoy.imagemeister.Browser
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.
private static final String copyright
private static final String kURLString
private static final String kFactoriesFileName
private static final String kImageFolderName
private static final String kTopLevelTextString
private static final String kDDSinkFileName
private static final String kDDSourceFileName
private static final int kMaxFilesToShow
private static final int kStandardFilterFlags
private AboutBox about
private BrowserDisplay display
private DDSource ees
private Vector theImageViewers
private Vector theInfoViewers
private DiskObject currentContainer
private String dataFolder
private boolean bShowInNewWindow
private boolean bShowAllFiles
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 |
boolean openDDSink(String eePath)
boolean openDDSource(String eePath)
public void visitURLButtonClicked()
Called when the About Box's URL button is clicked.
- Implements:
- visitURLButtonClicked in interface VisitURLRecipient
public void closeImageViewer(ImageViewerI viewer)
From the ImageViewerOwner interface.
- Implements:
- closeImageViewer in interface ImageViewerOwner
public void closeInfoViewer(InfoViewerI viewer)
From the InfoViewerOwner interface.
- Implements:
- closeInfoViewer in interface InfoViewerOwner
public void closeWindow(Window w)
From the WindowOwner interface.
- Implements:
- closeWindow in interface WindowOwner
public boolean processEvent(Event e)
Handle commands sent from the DDSource class.
- Implements:
- processEvent in interface DDCommandRecipient
public void browserCloseButtonClicked()
- Implements:
- browserCloseButtonClicked in interface BrowserDisplayOwnerI
private void doQuitButton()
private void doAboutButton()
private void doShowButton()
Display the currently selected object.
private void doInfoButton()
Display info about the currently selected object.
private void doShowAllFilesCheckbox()
private void doNewWindowCheckbox()
void doUpALevelButton()
Show the parent folder of the current folder.
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
public boolean browserKeyPressed(int which,
int key)
- Implements:
- browserKeyPressed in interface BrowserDisplayOwnerI
private void showImageViewerForFile(DiskObject dobj)
Try to display 'dobj'
private void showInfoViewerForFile(DiskObject dobj)
Try to display info about 'dobj'
public void refreshCurrentDisplay()
Update the display. If we're at the top level, use the FileRegistry to get a list of the
mounted volumes.
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.
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