fi.hut.tml.xsmiles.gui.components.awt
Class AWTFileDialog

java.lang.Object
  extended byfi.hut.tml.xsmiles.gui.components.awt.AWTFileDialog
All Implemented Interfaces:
XDialog, XFileDialog

public class AWTFileDialog
extends java.lang.Object
implements XFileDialog

The Swing file chooser component

Author:
Mikko Honkala, awt mod juha

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

topLevelFrame

protected java.awt.Frame topLevelFrame

dir

protected java.io.File dir

fc

protected java.awt.FileDialog fc
Constructor Detail

AWTFileDialog

public AWTFileDialog(BrowserWindow w,
                     boolean save,
                     java.awt.Frame topLevel)

AWTFileDialog

public AWTFileDialog(BrowserWindow w,
                     boolean save,
                     java.lang.String filename,
                     java.awt.Frame topLevel)
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