fi.hut.tml.xsmiles.gui.components.swing
Class SwingFileDialog

java.lang.Object
  extended byfi.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

Field Summary
protected  BrowserWindow browser
           
protected  java.io.File dir
           
protected  javax.swing.JFileChooser fc
           
protected  java.lang.String fFilename
           
protected  boolean fSave
           
protected  java.io.File selection
           
 
Fields inherited from interface fi.hut.tml.xsmiles.gui.components.XDialog
SELECTION_FAILED, SELECTION_OK
 
Constructor Summary
SwingFileDialog(BrowserWindow w, boolean save)
           
SwingFileDialog(BrowserWindow w, boolean save, java.lang.String filename)
           
 
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
 

Field Detail

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
Constructor Detail

SwingFileDialog

public SwingFileDialog(BrowserWindow w,
                       boolean save)

SwingFileDialog

public SwingFileDialog(BrowserWindow w,
                       boolean save,
                       java.lang.String filename)
Method Detail

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