hades.manager
Class DesignManager.SwingFileChooser

java.lang.Object
  extended byhades.manager.DesignManager.SwingFileChooser
Enclosing class:
DesignManager

class DesignManager.SwingFileChooser
extends java.lang.Object


Field Summary
(package private)  javax.swing.JFileChooser fileChooser
           
(package private)  int mode
           
(package private)  java.io.File selectedFile
           
 
Constructor Summary
DesignManager.SwingFileChooser()
           
 
Method Summary
 java.lang.String getDirectory()
          return the name of the currently selected directory
 java.lang.String getFile()
          return the full hierarchical name of the currently selected file (or null if canceled or no file selected)
 java.lang.String select()
          display the JFileChooser dialog in the selected mode and wait until the user selects a filename or cancels.
 void setDefaultDirectory()
           
 void setDefaultName(java.lang.String defaultName)
          set the file name (pre-) selected by default.
 void setExtension(java.lang.Object _extensions)
           
 void setMode(int _mode)
          set the mode, either java.awt.FileDialog.LOAD or FileDialog.SAVE
 void setTitle(java.lang.String title)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fileChooser

javax.swing.JFileChooser fileChooser

selectedFile

java.io.File selectedFile

mode

int mode
Constructor Detail

DesignManager.SwingFileChooser

public DesignManager.SwingFileChooser()
Method Detail

setTitle

public void setTitle(java.lang.String title)

setExtension

public void setExtension(java.lang.Object _extensions)

setDefaultDirectory

public void setDefaultDirectory()

setDefaultName

public void setDefaultName(java.lang.String defaultName)
set the file name (pre-) selected by default. When called with null or empty ("") defaultName, we don't preselect a filename, but we try to remember and set the fileChooser directory from _lastFileDialogDirectory. If this is null too, we reset to the current working directory.


setMode

public void setMode(int _mode)
set the mode, either java.awt.FileDialog.LOAD or FileDialog.SAVE


select

public java.lang.String select()
display the JFileChooser dialog in the selected mode and wait until the user selects a filename or cancels. Return the pathname (String) or the selected file or null.


getDirectory

public java.lang.String getDirectory()
return the name of the currently selected directory


getFile

public java.lang.String getFile()
return the full hierarchical name of the currently selected file (or null if canceled or no file selected)