public abstract class AbstractOpenPanel extends Object implements UIPanel, UIPersistence
| Modifier and Type | Class and Description |
|---|---|
protected class |
AbstractOpenPanel.FormatFilter |
| Constructor and Description |
|---|
AbstractOpenPanel(String id,
String title)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFilter(String[] extensions,
String description) |
void |
addFilter(String extension,
String description) |
Component |
getComponent()
Gets the swing component to show in the dialog
|
File |
getCurrentDirectory()
Get the directory browsed by the user
|
int |
getCurrentFilterId()
Return the identifier of the current filter
|
JFileChooser |
getFileChooser()
This method returns the FileChooser attached to this.
|
File |
getSelectedFile() |
File[] |
getSelectedFiles() |
String |
getTitle()
Gets the title to show in the dialog
|
void |
loadState()
Recover the dialog state on the last save state, using the dialog identifier.
|
void |
saveState()
Save the current state of the dialog.
|
void |
setAcceptAllFileFilterUsed(boolean enableAllFiles)
Determines whether the AcceptAll FileFilter is used as an available
choice in the choosable filter list.
|
void |
setCurrentDirectory(File dir)
Set the directory shown to the user
|
boolean |
setCurrentFilter(int filterIdentifier)
Set the selected file filter
|
void |
setSelectedFile(File file)
Set the selected file in the directory
|
void |
setSingleSelection(boolean singleSelection)
Set the file dialog to allow single selection.
|
abstract boolean |
showFoldersOnly()
To be set by inheriting classes.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetIconURL, validateInputpublic void loadState()
loadState in interface UIPersistencepublic void saveState()
saveState in interface UIPersistencepublic void setAcceptAllFileFilterUsed(boolean enableAllFiles)
enableAllFiles - public Component getComponent()
UIPanelgetComponent in interface UIPanelpublic JFileChooser getFileChooser()
public void setSingleSelection(boolean singleSelection)
singleSelection - True for single, false for multiplepublic abstract boolean showFoldersOnly()
public String getTitle()
UIPanelpublic File getSelectedFile()
public File[] getSelectedFiles()
public void setSelectedFile(File file)
file - public void setCurrentDirectory(File dir)
dir - public File getCurrentDirectory()
public int getCurrentFilterId()
setCurrentFilterpublic boolean setCurrentFilter(int filterIdentifier)
getCurrentFilterIdCopyright © 2015 IRSTV CNRS-FR-2488. All Rights Reserved.