|
BIJ API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--io.OpenPreviewDialog
Convenient file open dialog that can show header info (any you want, just extend this class). (c) 2003 Michael Abramoff. All rights reserved.
Field Summary | |
protected java.awt.Button |
cancel
|
protected boolean |
canceling
Whether you are canceling at end of dialog. |
protected boolean |
canListRoots
|
protected java.awt.Choice |
choiceDir
|
protected java.awt.Dialog |
dialog
|
protected static java.lang.String |
directory
|
protected FileAndString[] |
dirs
|
protected java.lang.Object |
filter
|
protected int |
indexOfCurrentDir
Holds the index in the list of "directory". |
protected java.awt.List |
list
|
protected java.lang.String[] |
names
The names of the files that were selected, null if no selection. |
protected java.awt.Button |
open
|
protected java.awt.Panel |
panel
|
protected java.awt.TextArea |
textarea
|
protected FileAndString[] |
validFiles
|
Constructor Summary | |
OpenPreviewDialog(java.lang.String title,
java.lang.Object filter,
java.lang.String directory)
Open a preview open dialog, a dialog that shows a list of files in the directory, and shows a text (currently header text) related to that file, to ease selection. |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent ae)
|
protected void |
addPathTree(java.util.Vector v,
java.io.File current)
Add the whole path for File current to the end of v. |
java.lang.String |
getDirectory()
|
java.lang.String[] |
getFileNames()
End events coming from dialogwindow. |
protected FileAndString[] |
getTree(java.lang.String path)
Build a sequence of File's representing the full path of the path String up to root, and also include the roots both before and after path. |
void |
itemStateChanged(java.awt.event.ItemEvent ie)
|
protected void |
selectedFileNames()
Get the filenames that were selected as an array of Strings. |
protected void |
showDirs(java.awt.Choice choiceDir,
java.lang.String directory)
Fill the choiceDir with all directory names up to the current directory and all roots. |
protected void |
showFileHeader(java.io.File file)
|
protected void |
showFiles(java.awt.List list,
java.lang.String directory,
java.lang.Object filter)
Fill the list with all files from the directory that fit filter. |
protected java.lang.String |
validFileDescription(java.io.File file)
Return a descrpiptive String to display the file. |
void |
windowActivated(java.awt.event.WindowEvent e)
All events coming from Dialog window. |
void |
windowClosed(java.awt.event.WindowEvent e)
|
void |
windowClosing(java.awt.event.WindowEvent e)
|
void |
windowDeactivated(java.awt.event.WindowEvent e)
|
void |
windowDeiconified(java.awt.event.WindowEvent e)
|
void |
windowIconified(java.awt.event.WindowEvent e)
|
void |
windowOpened(java.awt.event.WindowEvent e)
|
Methods inherited from class java.lang.Object |
|
Field Detail |
protected java.awt.Dialog dialog
protected static java.lang.String directory
protected java.lang.String[] names
protected java.awt.TextArea textarea
protected FileAndString[] validFiles
protected FileAndString[] dirs
protected java.awt.List list
protected java.awt.Button open
protected java.awt.Button cancel
protected java.awt.Choice choiceDir
protected java.lang.Object filter
protected boolean canListRoots
protected boolean canceling
protected java.awt.Panel panel
protected int indexOfCurrentDir
Constructor Detail |
public OpenPreviewDialog(java.lang.String title, java.lang.Object filter, java.lang.String directory)
title
- the title of the dialogdirectory
- the directory the dialog will openfilter
- a FilenameFilter that filters names for display.Method Detail |
public void itemStateChanged(java.awt.event.ItemEvent ie)
itemStateChanged
in interface java.awt.event.ItemListener
public void actionPerformed(java.awt.event.ActionEvent ae)
actionPerformed
in interface java.awt.event.ActionListener
protected void selectedFileNames()
public void windowActivated(java.awt.event.WindowEvent e)
windowActivated
in interface java.awt.event.WindowListener
public void windowClosed(java.awt.event.WindowEvent e)
windowClosed
in interface java.awt.event.WindowListener
public void windowClosing(java.awt.event.WindowEvent e)
windowClosing
in interface java.awt.event.WindowListener
public void windowDeactivated(java.awt.event.WindowEvent e)
windowDeactivated
in interface java.awt.event.WindowListener
public void windowDeiconified(java.awt.event.WindowEvent e)
windowDeiconified
in interface java.awt.event.WindowListener
public void windowIconified(java.awt.event.WindowEvent e)
windowIconified
in interface java.awt.event.WindowListener
public void windowOpened(java.awt.event.WindowEvent e)
windowOpened
in interface java.awt.event.WindowListener
public java.lang.String[] getFileNames()
public java.lang.String getDirectory()
protected void showFileHeader(java.io.File file)
protected void showFiles(java.awt.List list, java.lang.String directory, java.lang.Object filter)
list
- a java.awt.List with all filenames.directory
- the directory from which you want the files/filenamesfilter
- a FilenameFilter to accept the type of file to show up in files.protected java.lang.String validFileDescription(java.io.File file)
file
- the File.protected void showDirs(java.awt.Choice choiceDir, java.lang.String directory)
choiceDir
- a Choice GUI item that contains a list of directories.directoy
- the name of the directory you want to fill choiceDir with.protected FileAndString[] getTree(java.lang.String path)
path
- a String with the path for which you want the tree.protected void addPathTree(java.util.Vector v, java.io.File current)
|
BIJ API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |