fi.hut.tml.xsmiles.gui.components.swing
Class SwingFileDialog
java.lang.Object
fi.hut.tml.xsmiles.gui.components.swing.SwingFileDialog
- All Implemented Interfaces:
- XDialog, XFileDialog
- public class SwingFileDialog
- extends java.lang.Object
- implements XFileDialog
The Swing file chooser component
- Author:
- Mikko Honkala
|
Method Summary |
java.io.File |
getSelectedFile()
return the file user selected |
int |
select()
open the selection box and return a failure/ok code |
void |
setFile(java.io.File f)
|
void |
setPrompt(java.lang.String prompt)
|
void |
setTitle(java.lang.String title)
open the selection box and return a failure/ok code |
java.io.File |
showFileDialog()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
browser
protected BrowserWindow browser
selection
protected java.io.File selection
fSave
protected boolean fSave
fFilename
protected java.lang.String fFilename
dir
protected java.io.File dir
fc
protected javax.swing.JFileChooser fc
SwingFileDialog
public SwingFileDialog(BrowserWindow w,
boolean save)
SwingFileDialog
public SwingFileDialog(BrowserWindow w,
boolean save,
java.lang.String filename)
select
public int select()
- open the selection box and return a failure/ok code
- Specified by:
select in interface XDialog
getSelectedFile
public java.io.File getSelectedFile()
- return the file user selected
- Specified by:
getSelectedFile in interface XFileDialog
showFileDialog
public java.io.File showFileDialog()
setTitle
public void setTitle(java.lang.String title)
- Description copied from interface:
XDialog
- open the selection box and return a failure/ok code
- Specified by:
setTitle in interface XDialog
setPrompt
public void setPrompt(java.lang.String prompt)
- Specified by:
setPrompt in interface XDialog
setFile
public void setFile(java.io.File f)
- Specified by:
setFile in interface XFileDialog
X-Smiles 1.2