|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JFileChooser com.jidesoft.swing.FolderChooser
public class FolderChooser
FolderChooser
provides a simple mechanism for the user to choose a folder.
FolderChooser chooser = new FolderChooser(); int returnVal = chooser.showOpenDialog(parent); if(returnVal == FolderChooser.APPROVE_OPTION) { System.out.println("You chose to open this file: " + chooser.getSelectedFile().getName()); }
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JFileChooser |
---|
JFileChooser.AccessibleJFileChooser |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
static int |
BUTTON_ALL
|
static int |
BUTTON_DELETE
|
static int |
BUTTON_DESKTOP
|
static int |
BUTTON_MY_DOCUMENTS
|
static int |
BUTTON_NEW
|
static int |
BUTTON_REFRESH
|
static String |
PROPERTY_AVAILABLE_BUTTONS
Property for _availableButtons . |
static String |
PROPERTY_NAVIGATION_FIELD_VISIBLE
Bound property for _navigationFieldVisible . |
static String |
PROPERTY_RECENTLIST
|
static String |
PROPERTY_RECENTLIST_VISIBLE
|
Fields inherited from class javax.swing.JComponent |
---|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
FolderChooser()
|
|
FolderChooser(File currentDirectory)
|
|
FolderChooser(File currentDirectory,
FileSystemView fsv)
|
|
FolderChooser(FileSystemView fsv)
|
|
FolderChooser(String currentDirectoryPath)
|
|
FolderChooser(String currentDirectoryPath,
FileSystemView fsv)
|
Method Summary | |
---|---|
int |
getAvailableButtons()
Get the visibilities of each buttons on the title bar of dockable frame. |
Comparator<File> |
getFileComparator()
Gets the comparator that will be used to compare the folders displayed in the FolderChooser. |
List<String> |
getRecentList()
Gets recent selected folder list. |
File |
getSelectedFolder()
Returns the selected folder. |
String |
getUIClassID()
Returns a string that specifies the name of the L&F class that renders this component. |
boolean |
isNavigationFieldVisible()
Determines whether the navigation text field is visible. |
boolean |
isRecentListVisible()
Get the visibility of the recent list combobox. |
void |
setAvailableButtons(int availableButtons)
Set the visibilities of each buttons on the title bar of dockable frame. |
void |
setFileComparator(Comparator<File> fileComparator)
Sets the comparator that will be used to compare the folders displayed in the FolderChooser. |
void |
setFileFilter(FileFilter filter)
|
void |
setNavigationFieldVisible(boolean navigationFieldVisible)
Sets the navigation text fields visibility. |
void |
setRecentList(List<String> recentList)
Sets the recent folder list. |
void |
setRecentListVisible(boolean recentListVisible)
Set the visibility of the recent list combobox. |
void |
setSelectedFolder(File selectedFolder)
Sets the selected folder. |
void |
updateUI()
Resets the UI property to a value from the current look and feel. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String PROPERTY_RECENTLIST
public static final String PROPERTY_RECENTLIST_VISIBLE
public static final int BUTTON_ALL
public static final int BUTTON_DELETE
public static final int BUTTON_NEW
public static final int BUTTON_REFRESH
public static final int BUTTON_DESKTOP
public static final int BUTTON_MY_DOCUMENTS
public static final String PROPERTY_AVAILABLE_BUTTONS
_availableButtons
.
setAvailableButtons(int)
,
Constant Field Valuespublic static final String PROPERTY_NAVIGATION_FIELD_VISIBLE
_navigationFieldVisible
.
setNavigationFieldVisible(boolean)
,
Constant Field ValuesConstructor Detail |
---|
public FolderChooser()
public FolderChooser(String currentDirectoryPath)
public FolderChooser(File currentDirectory)
public FolderChooser(FileSystemView fsv)
public FolderChooser(File currentDirectory, FileSystemView fsv)
public FolderChooser(String currentDirectoryPath, FileSystemView fsv)
Method Detail |
---|
public List<String> getRecentList()
File
.
public void setRecentList(List<String> recentList)
File
. Property change event on PROPERTY_RECENTLIST
will be fired when recent folder list is changed.
recentList
- the recent folder list.public void updateUI()
updateUI
in class JFileChooser
JComponent.updateUI()
public String getUIClassID()
getUIClassID
in class JFileChooser
JComponent.getUIClassID()
,
UIDefaults.getUI(javax.swing.JComponent)
public File getSelectedFolder()
setSelectedFolder
or by a
user action, such as selecting the folder from a 'folder tree' in the UI.
setSelectedFolder(java.io.File)
public void setSelectedFolder(File selectedFolder)
Property change event
JFileChooser.SELECTED_FILE_CHANGED_PROPERTY
will
be fired when a new folder is selected.
selectedFolder
- the selected foldergetSelectedFolder()
public void setNavigationFieldVisible(boolean navigationFieldVisible)
navigationFieldVisible
- if true, the navigation text field is displayed; otherwise it is hidden.public boolean isNavigationFieldVisible()
public int getAvailableButtons()
public void setAvailableButtons(int availableButtons)
availableButtons
- the visibilities of each buttons. It's a bit wise OR of values specified at BUTTON_XXX.public boolean isRecentListVisible()
public void setRecentListVisible(boolean recentListVisible)
recentListVisible
- the visibility of the comboboxpublic void setFileFilter(FileFilter filter)
setFileFilter
in class JFileChooser
public Comparator<File> getFileComparator()
public void setFileComparator(Comparator<File> fileComparator)
AlphanumFileComparator
to sort the folder alphanum-ly.
fileComparator
- a new Comparator.
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |