|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.swing.visuals.DirectoryDialog
public class DirectoryDialog
The DirectoryDialog
allows the user to select a directory,
rather than a single file (javax.swing.JFileChooser). It is modeled after the VSS "Set
Working Folder" directory chooser
Field Summary | |
---|---|
protected boolean |
_allowNewDirectories
|
protected java.lang.String |
_currentDirectory
|
protected com.sas.swing.visuals.DirectoryList |
_dirList
|
protected javax.swing.JTextField |
_name
|
protected java.awt.Frame |
_parent
|
protected boolean |
_prompt
|
protected TreeView |
_tree
|
protected boolean |
_wasCancelled
|
protected javax.swing.JButton |
cancelButton
|
protected java.lang.String |
NAME
|
protected javax.swing.JButton |
okButton
|
protected static java.lang.String |
RB_KEY
|
static java.lang.String |
separator
|
Constructor Summary | |
---|---|
DirectoryDialog(java.awt.Frame frame,
java.lang.String title,
java.lang.String startingDirectory)
creates a directory dialog parent to the given frame, with the specified title and starting directory |
|
DirectoryDialog(java.awt.Frame frame,
java.lang.String title,
java.lang.String startingDirectory,
boolean allowNew)
creates a directory dialog parent to the given frame, with the specified title and starting directory |
|
DirectoryDialog(java.awt.Frame frame,
java.lang.String title,
java.lang.String startingDirectory,
boolean allowNew,
boolean prompt)
creates a directory dialog parent to the given frame, with the specified title and starting directory |
Field Detail |
---|
public static java.lang.String separator
protected static final java.lang.String RB_KEY
protected java.lang.String NAME
protected com.sas.swing.visuals.DirectoryList _dirList
protected TreeView _tree
protected javax.swing.JTextField _name
protected java.lang.String _currentDirectory
protected java.awt.Frame _parent
protected boolean _wasCancelled
protected boolean _allowNewDirectories
protected boolean _prompt
protected javax.swing.JButton okButton
protected javax.swing.JButton cancelButton
Constructor Detail |
---|
public DirectoryDialog(java.awt.Frame frame, java.lang.String title, java.lang.String startingDirectory, boolean allowNew, boolean prompt)
frame
- parent frame; dialog will be centered over thistitle
- dialog titlestartingDirectory
- directory that is displayed; tree is initially
expanded to show thisallowNew
- whether to allow new direcories to be creating by typing in the text fieldprompt
- if true and allowNew is true, user will be prompted to
create a directory if the directory they enter (by typing in the text field) does not exist.
if false and allowNew is true, the directory will be created without being prompted
if allowNew is false, the user will never be promptedpublic DirectoryDialog(java.awt.Frame frame, java.lang.String title, java.lang.String startingDirectory, boolean allowNew)
frame
- parent frame; dialog will be centered over thistitle
- dialog titlestartingDirectory
- directory that is displayed; tree is initially
expanded to show thisallowNew
- whether to allow new direcories to be creating by typing in the text fieldpublic DirectoryDialog(java.awt.Frame frame, java.lang.String title, java.lang.String startingDirectory)
frame
- parent frame; dialog will be centered over thistitle
- dialog titlestartingDirectory
- directory that is displayed; tree is initially
expanded to show thisMethod Detail |
---|
public void setDirectory(java.lang.String directory)
public java.lang.String getDirectory()
protected NodeView searchTree(NodeView node, java.lang.String val)
protected void onOK()
protected void onCancel()
public boolean wasCancelled()
public void setVisible(boolean visible)
setVisible
in class java.awt.Dialog
public java.awt.Insets getInsets()
getInsets
in class java.awt.Container
public boolean verifyDirectory(java.awt.Frame parent, java.lang.String directory)
parent
- parent Frame that prompts an error message dialogs can be
parented todirectory
- name of directory to verify
public void keyPressed(java.awt.event.KeyEvent evt)
keyPressed
in interface java.awt.event.KeyListener
public void keyReleased(java.awt.event.KeyEvent evt)
keyReleased
in interface java.awt.event.KeyListener
public void keyTyped(java.awt.event.KeyEvent evt)
keyTyped
in interface java.awt.event.KeyListener
public void windowOpened(java.awt.event.WindowEvent evt)
windowOpened
in interface java.awt.event.WindowListener
public void windowClosing(java.awt.event.WindowEvent evt)
windowClosing
in interface java.awt.event.WindowListener
public void windowClosed(java.awt.event.WindowEvent evt)
windowClosed
in interface java.awt.event.WindowListener
public void windowIconified(java.awt.event.WindowEvent evt)
windowIconified
in interface java.awt.event.WindowListener
public void windowDeiconified(java.awt.event.WindowEvent evt)
windowDeiconified
in interface java.awt.event.WindowListener
public void windowActivated(java.awt.event.WindowEvent evt)
windowActivated
in interface java.awt.event.WindowListener
public void windowDeactivated(java.awt.event.WindowEvent evt)
windowDeactivated
in interface java.awt.event.WindowListener
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |