Package PamUtils
Class SelectFolder
java.lang.Object
PamUtils.SelectFolder
Makes a dialog panel for selecting a folder
typically for file output.
- Author:
- Doug Gillespie
-
Constructor Summary
ConstructorDescriptionSelectFolder
(int textLength) SelectFolder
(String borderLabel, int textLength) SelectFolder
(String borderLabel, int textLength, boolean showSubFolderOption) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFolderChangeListener
(FolderChangeListener folderChangeListener) Add a folder change listener to receive notification if the browse button was used to select a new folder.void
createPanel
(String borderLabel, int textLength) getFolderName
(boolean checkPath) Get the folder name and optionally check and create the path for data storage.PamUtils.SelectFolder.FolderPanel
boolean
boolean
Get the state of the sub folder check box.boolean
boolean
void
removeFolderChangeListener
(FolderChangeListener folderChangeListener) Remove a folder change listenervoid
setCreateIfNeeded
(boolean createIfNeeded) void
setEnabled
(boolean enable) void
setFolderName
(String folderName) void
setIncludeSubFolders
(boolean includeSubfolders) Set the state of the sub folder check box.void
setMustExist
(boolean mustExist) void
setShowSubFolderOption
(boolean showSubFolderOption) void
setSubFolderButtonName
(String buttonName) Set the name for the "Include Sub folders" checkboxvoid
setSubFolderButtonToolTip
(String tipText) Set the name for the "Include Sub folders" checkboxvoid
setTextLength
(int textLength)
-
Constructor Details
-
SelectFolder
-
SelectFolder
-
SelectFolder
public SelectFolder(int textLength)
-
-
Method Details
-
createPanel
-
setEnabled
public void setEnabled(boolean enable) -
setIncludeSubFolders
public void setIncludeSubFolders(boolean includeSubfolders) Set the state of the sub folder check box.- Parameters:
includeSubfolders
- true to check the box.
-
isIncludeSubFolders
public boolean isIncludeSubFolders()Get the state of the sub folder check box.- Returns:
- true if selected
-
addFolderChangeListener
Add a folder change listener to receive notification if the browse button was used to select a new folder.- Parameters:
folderChangeListener
- change listener
-
removeFolderChangeListener
Remove a folder change listener- Parameters:
folderChangeListener
-
-
getFolderName
Get the folder name and optionally check and create the path for data storage.- Parameters:
checkPath
- set true to check / create the storage path.- Returns:
- Path string, or null if path check fails.
-
setFolderName
-
getFolderPanel
public PamUtils.SelectFolder.FolderPanel getFolderPanel() -
setSubFolderButtonName
Set the name for the "Include Sub folders" checkbox- Parameters:
buttonName
- new name for the checkbox.
-
setSubFolderButtonToolTip
Set the name for the "Include Sub folders" checkbox- Parameters:
buttonName
- new name for the checkbox.
-
setTextLength
public void setTextLength(int textLength) -
isShowSubFolderOption
public boolean isShowSubFolderOption() -
setShowSubFolderOption
public void setShowSubFolderOption(boolean showSubFolderOption) -
isMustExist
public boolean isMustExist()- Returns:
- the mustExist
-
setMustExist
public void setMustExist(boolean mustExist) - Parameters:
mustExist
- the mustExist to set
-
isCreateIfNeeded
public boolean isCreateIfNeeded()- Returns:
- the createIfNeeded
-
setCreateIfNeeded
public void setCreateIfNeeded(boolean createIfNeeded) - Parameters:
createIfNeeded
- the createIfNeeded to set
-