|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.visuals.DirectoryDialog
public class DirectoryDialog
The DirectoryDialog allows the user to select a directory,
rather than a single file (java.awt.FileDialog). It is modeled after the VSS "Set
Working Folder" directory chooser
| Field Summary | |
|---|---|
protected boolean |
_allowNewDirectories
|
protected java.lang.String |
_currentDirectory
|
protected com.sas.visuals.DirectoryList |
_dirList
|
protected TextField |
_name
|
protected java.awt.Frame |
_parent
|
protected boolean |
_prompt
|
protected TreeView |
_tree
|
protected boolean |
_wasCancelled
|
protected java.awt.Button |
cancelButton
|
protected java.lang.String |
NAME
|
protected java.awt.Button |
okButton
|
protected static java.lang.String |
RB_KEY
|
static java.lang.String |
separator
|
| Fields inherited from class com.sas.awt.Dialog |
|---|
_cantUseSASModal, _inApplet, _modal, autoDispose, READY, setVisibleCalled, t |
| 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 |
|
| Method Summary | |
|---|---|
java.lang.String |
getDirectory()
return the directory specified by the user in the dialog |
java.awt.Insets |
getInsets()
|
void |
keyPressed(java.awt.event.KeyEvent evt)
|
void |
keyReleased(java.awt.event.KeyEvent evt)
|
void |
keyTyped(java.awt.event.KeyEvent evt)
|
protected void |
onCancel()
|
protected void |
onOK()
|
protected NodeView |
searchTree(NodeView node,
java.lang.String val)
search tree for expanded text (not currently supported in TreeView) |
void |
setDirectory(java.lang.String directory)
|
void |
setVisible(boolean visible)
setVisible() is the set accessor method for the Visible attribute. |
boolean |
verifyDirectory(java.awt.Frame parent,
java.lang.String directory)
verify that the specified directory exists; if the directory does not exist, the user is prompted to create the directory |
boolean |
wasCancelled()
return true if dialog wasCancelled |
void |
windowActivated(java.awt.event.WindowEvent evt)
Part of the implementation of the WindowListener interface. |
void |
windowClosed(java.awt.event.WindowEvent evt)
Part of the implementation of the WindowListener interface. |
void |
windowClosing(java.awt.event.WindowEvent evt)
Part of the implementation of the WindowListener interface. |
void |
windowDeactivated(java.awt.event.WindowEvent evt)
Part of the implementation of the WindowListener interface. |
void |
windowDeiconified(java.awt.event.WindowEvent evt)
Part of the implementation of the WindowListener interface. |
void |
windowIconified(java.awt.event.WindowEvent evt)
Part of the implementation of the WindowListener interface. |
void |
windowOpened(java.awt.event.WindowEvent evt)
Part of the implementation of the WindowListener interface. |
| Methods inherited from class com.sas.awt.Dialog |
|---|
center, centerOver, centerOverWindow, dispose, fireReadySignal, getAutoDispose, getDefaultHeight, getDefaultWidth, getExtendedBeanInfo, getText, hide, isSASModalEnabled, newDispatchThread, processWindowEvent, setAutoDispose, setDefaultHeight, setDefaultWidth, setModal, setResizable, setSASModalEnabled, setText, setTitle, setVisible, show, stopDispatchThread, waitForReadySignal, waitTilReady |
| Methods inherited from interface com.sas.awt.ContainerInterface |
|---|
getComponents, getLayout, invalidate, setLayout, validate |
| Field Detail |
|---|
public static java.lang.String separator
protected static final java.lang.String RB_KEY
protected java.lang.String NAME
protected com.sas.visuals.DirectoryList _dirList
protected TreeView _tree
protected TextField _name
protected java.lang.String _currentDirectory
protected java.awt.Frame _parent
protected boolean _wasCancelled
protected boolean _allowNewDirectories
protected boolean _prompt
protected java.awt.Button okButton
protected java.awt.Button 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 prompted
public 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 field
public 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 this| Method 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)
VisualInterface
setVisible in interface VisualInterfacesetVisible in class Dialogvisible - Whether the component should be visible.VisualInterface.setVisible(boolean)public java.awt.Insets getInsets()
getInsets in interface ContainerInterfacegetInsets in class DialogContainerComponent
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.KeyListenerpublic void keyReleased(java.awt.event.KeyEvent evt)
keyReleased in interface java.awt.event.KeyListenerpublic void keyTyped(java.awt.event.KeyEvent evt)
keyTyped in interface java.awt.event.KeyListenerpublic void windowOpened(java.awt.event.WindowEvent evt)
Dialog
windowOpened in interface java.awt.event.WindowListenerwindowOpened in class Dialogevt - windowEventpublic void windowClosing(java.awt.event.WindowEvent evt)
DialogWhen the window close button is clicked, the window is destroyed using dispose() and a MessageBoxEvent is sent with the button field as CANCEL.
windowClosing in interface java.awt.event.WindowListenerwindowClosing in class Dialogevt - windowEventpublic void windowClosed(java.awt.event.WindowEvent evt)
Dialog
windowClosed in interface java.awt.event.WindowListenerwindowClosed in class Dialogevt - windowEventpublic void windowIconified(java.awt.event.WindowEvent evt)
Dialog
windowIconified in interface java.awt.event.WindowListenerwindowIconified in class Dialogevt - windowEventpublic void windowDeiconified(java.awt.event.WindowEvent evt)
Dialog
windowDeiconified in interface java.awt.event.WindowListenerwindowDeiconified in class Dialogevt - windowEventpublic void windowActivated(java.awt.event.WindowEvent evt)
Dialog
windowActivated in interface java.awt.event.WindowListenerwindowActivated in class Dialogevt - windowEventpublic void windowDeactivated(java.awt.event.WindowEvent evt)
Dialog
windowDeactivated in interface java.awt.event.WindowListenerwindowDeactivated in class Dialogevt - windowEvent
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||