|
||||||||||
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.alee.laf.filechooser.WebFileChooser
public class WebFileChooser
This JFileChooser extension class provides a direct access to WebFileChooserUI methods. There is also a set of additional methods that allows to modify chooser view and access its components and data directly.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JFileChooser |
---|
javax.swing.JFileChooser.AccessibleJFileChooser |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected java.util.List<? extends java.awt.Image> |
customIcons
Custom icons for file chooser dialog. |
Fields inherited from class javax.swing.JFileChooser |
---|
ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY, accessibleContext, ACCESSORY_CHANGED_PROPERTY, APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY, APPROVE_BUTTON_TEXT_CHANGED_PROPERTY, APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY, APPROVE_OPTION, APPROVE_SELECTION, CANCEL_OPTION, CANCEL_SELECTION, CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY, CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY, CUSTOM_DIALOG, DIALOG_TITLE_CHANGED_PROPERTY, DIALOG_TYPE_CHANGED_PROPERTY, DIRECTORIES_ONLY, DIRECTORY_CHANGED_PROPERTY, ERROR_OPTION, FILE_FILTER_CHANGED_PROPERTY, FILE_HIDING_CHANGED_PROPERTY, FILE_SELECTION_MODE_CHANGED_PROPERTY, FILE_SYSTEM_VIEW_CHANGED_PROPERTY, FILE_VIEW_CHANGED_PROPERTY, FILES_AND_DIRECTORIES, FILES_ONLY, MULTI_SELECTION_ENABLED_CHANGED_PROPERTY, OPEN_DIALOG, SAVE_DIALOG, SELECTED_FILE_CHANGED_PROPERTY, SELECTED_FILES_CHANGED_PROPERTY |
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 | |
---|---|
WebFileChooser()
Constructs a WebFileChooser pointing to the user's default directory. |
|
WebFileChooser(java.io.File currentDirectory)
Constructs a WebFileChooser using the given File as the path. |
|
WebFileChooser(java.io.File currentDirectory,
javax.swing.filechooser.FileSystemView fsv)
Constructs a WebFileChooser using the given current directory and FileSystemView. |
|
WebFileChooser(javax.swing.filechooser.FileSystemView fsv)
Constructs a WebFileChooser using the given FileSystemView. |
|
WebFileChooser(java.lang.String currentDirectoryPath)
Constructs a WebFileChooser using the given path. |
|
WebFileChooser(java.lang.String currentDirectoryPath,
javax.swing.filechooser.FileSystemView fsv)
Constructs a WebFileChooser using the given current directory path and FileSystemView. |
Method Summary | |
---|---|
protected javax.swing.JDialog |
createDialog(java.awt.Component parent)
|
AbstractFileFilter |
getActiveFileFilter()
Returns currenly active file filter. |
java.util.List<AbstractFileFilter> |
getAvailableFilters()
Returns list of available file filters. |
java.awt.Image |
getDialogIcon()
Returns custom dialog icon. |
java.util.List<? extends java.awt.Image> |
getDialogIcons()
Returns custom dialog icons. |
WebFileChooserPanel |
getFileChooserPanel()
Returns file chooser panel. |
java.lang.String |
getLanguageContainerKey()
Returns language container key for container which implements this interface. |
WebFileChooserUI |
getWebUI()
Returns Web-UI applied to this class. |
boolean |
isGenerateThumbnails()
Returns whether file thumbnails are generated or not. |
boolean |
isLanguageSet()
Returns whether this component registered in LanguageManager or not. |
void |
removeLanguage()
Unregisters component from LanguageManager. |
void |
removeLanguageContainerKey()
Removes language container key for container which implements this interface. |
void |
removeLanguageUpdater()
Unregisters any custom language updater set for this component. |
void |
setApproveButtonLanguage(java.lang.String key)
Sets approve button language key. |
void |
setApproveButtonText(FileApproveText approveText)
Sets approve button text type. |
void |
setCurrentDirectory(java.lang.String directoryPath)
Sets currently displayed directory. |
void |
setDialogIcon(javax.swing.ImageIcon icon)
Sets custom dialog icon. |
void |
setDialogIcons(java.util.List<? extends javax.swing.ImageIcon> customIcons)
Sets custom dialog icons. |
void |
setDialogImage(java.awt.Image icon)
Sets custom dialog icon. |
void |
setDialogImages(java.util.List<? extends java.awt.Image> customIcons)
Sets custom dialog icons. |
void |
setDialogTitleKey(java.lang.String dialogTitle)
Sets dialog title language key. |
void |
setGenerateThumbnails(boolean generate)
Sets whether file thumbnails should be generated or not. |
void |
setLanguage(java.lang.String key,
java.lang.Object... data)
Registers component in LanguageManager under specified key and with specified formatting data. |
void |
setLanguageContainerKey(java.lang.String key)
Sets language container key for container which implements this interface. |
void |
setLanguageUpdater(LanguageUpdater updater)
Registers custom language updater for this component. |
void |
setSelectedFile(java.lang.String filePath)
Sets currently selected file. |
static java.util.List<java.io.File> |
showMultiOpenDialog()
Constructs and displays multiply files open dialog and returns selected files list as a result. |
static java.util.List<java.io.File> |
showMultiOpenDialog(java.awt.Component parent,
Customizer<WebFileChooser> customizer)
Constructs and displays multiply files open dialog and returns selected files list as a result. |
static java.util.List<java.io.File> |
showMultiOpenDialog(java.awt.Component parent,
java.lang.String currentDirectory)
Constructs and displays multiply files open dialog and returns selected files list as a result. |
static java.util.List<java.io.File> |
showMultiOpenDialog(java.awt.Component parent,
java.lang.String currentDirectory,
Customizer<WebFileChooser> customizer)
Constructs and displays multiply files open dialog and returns selected files list as a result. |
static java.util.List<java.io.File> |
showMultiOpenDialog(Customizer<WebFileChooser> customizer)
Constructs and displays multiply files open dialog and returns selected files list as a result. |
static java.util.List<java.io.File> |
showMultiOpenDialog(java.lang.String currentDirectory,
Customizer<WebFileChooser> customizer)
Constructs and displays multiply files open dialog and returns selected files list as a result. |
static java.io.File |
showOpenDialog()
Constructs and displays file open dialog and returns selected file as a result. |
static java.io.File |
showOpenDialog(java.awt.Component parent,
Customizer<WebFileChooser> customizer)
Constructs and displays file open dialog and returns selected file as a result. |
static java.io.File |
showOpenDialog(java.awt.Component parent,
java.lang.String currentDirectory)
Constructs and displays file open dialog and returns selected file as a result. |
static java.io.File |
showOpenDialog(java.awt.Component parent,
java.lang.String currentDirectory,
Customizer<WebFileChooser> customizer)
Constructs and displays file open dialog and returns selected file as a result. |
static java.io.File |
showOpenDialog(Customizer<WebFileChooser> customizer)
Constructs and displays file open dialog and returns selected file as a result. |
static java.io.File |
showOpenDialog(java.lang.String currentDirectory,
Customizer<WebFileChooser> customizer)
Constructs and displays file open dialog and returns selected file as a result. |
static java.io.File |
showSaveDialog()
Constructs and displays file save dialog and returns selected file as a result. |
static java.io.File |
showSaveDialog(java.awt.Component parent,
Customizer<WebFileChooser> customizer)
Constructs and displays file save dialog and returns selected file as a result. |
static java.io.File |
showSaveDialog(java.awt.Component parent,
java.lang.String currentDirectory)
Constructs and displays file save dialog and returns selected file as a result. |
static java.io.File |
showSaveDialog(java.awt.Component parent,
java.lang.String currentDirectory,
Customizer<WebFileChooser> customizer)
Constructs and displays file save dialog and returns selected file as a result. |
static java.io.File |
showSaveDialog(Customizer<WebFileChooser> customizer)
Constructs and displays file save dialog and returns selected file as a result. |
static java.io.File |
showSaveDialog(java.lang.String currentDirectory,
Customizer<WebFileChooser> customizer)
Constructs and displays file save dialog and returns selected file as a result. |
void |
updateLanguage(java.lang.Object... data)
Updates component language and formatting data. |
void |
updateLanguage(java.lang.String key,
java.lang.Object... data)
Changes component language key and updates its language and formatting data. |
void |
updateUI()
Installs a Web-UI into this component. |
Methods inherited from class javax.swing.JFileChooser |
---|
accept, addActionListener, addChoosableFileFilter, approveSelection, cancelSelection, changeToParentDirectory, ensureFileIsVisible, fireActionPerformed, getAcceptAllFileFilter, getAccessibleContext, getAccessory, getActionListeners, getApproveButtonMnemonic, getApproveButtonText, getApproveButtonToolTipText, getChoosableFileFilters, getControlButtonsAreShown, getCurrentDirectory, getDescription, getDialogTitle, getDialogType, getDragEnabled, getFileFilter, getFileSelectionMode, getFileSystemView, getFileView, getIcon, getName, getSelectedFile, getSelectedFiles, getTypeDescription, getUI, getUIClassID, isAcceptAllFileFilterUsed, isDirectorySelectionEnabled, isFileHidingEnabled, isFileSelectionEnabled, isMultiSelectionEnabled, isTraversable, paramString, removeActionListener, removeChoosableFileFilter, rescanCurrentDirectory, resetChoosableFileFilters, setAcceptAllFileFilterUsed, setAccessory, setApproveButtonMnemonic, setApproveButtonMnemonic, setApproveButtonText, setApproveButtonToolTipText, setControlButtonsAreShown, setCurrentDirectory, setDialogTitle, setDialogType, setDragEnabled, setFileFilter, setFileHidingEnabled, setFileSelectionMode, setFileSystemView, setFileView, setMultiSelectionEnabled, setSelectedFile, setSelectedFiles, setup, showDialog, showOpenDialog, showSaveDialog |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.util.List<? extends java.awt.Image> customIcons
Constructor Detail |
---|
public WebFileChooser()
public WebFileChooser(java.lang.String currentDirectoryPath)
currentDirectoryPath
- a String giving the path to a file or directorypublic WebFileChooser(java.io.File currentDirectory)
currentDirectory
- a File object specifying the path to a file or directorypublic WebFileChooser(javax.swing.filechooser.FileSystemView fsv)
public WebFileChooser(java.io.File currentDirectory, javax.swing.filechooser.FileSystemView fsv)
public WebFileChooser(java.lang.String currentDirectoryPath, javax.swing.filechooser.FileSystemView fsv)
Method Detail |
---|
protected javax.swing.JDialog createDialog(java.awt.Component parent) throws java.awt.HeadlessException
createDialog
in class javax.swing.JFileChooser
java.awt.HeadlessException
public java.awt.Image getDialogIcon()
public java.util.List<? extends java.awt.Image> getDialogIcons()
public void setDialogIcon(javax.swing.ImageIcon icon)
icon
- new custom dialog iconpublic void setDialogImage(java.awt.Image icon)
icon
- new custom dialog iconpublic void setDialogIcons(java.util.List<? extends javax.swing.ImageIcon> customIcons)
customIcons
- new custom dialog iconspublic void setDialogImages(java.util.List<? extends java.awt.Image> customIcons)
customIcons
- new custom dialog iconspublic void setDialogTitleKey(java.lang.String dialogTitle)
dialogTitle
- title language keypublic void setCurrentDirectory(java.lang.String directoryPath)
directoryPath
- directory to displaypublic void setSelectedFile(java.lang.String filePath)
filePath
- file to selectpublic WebFileChooserPanel getFileChooserPanel()
public java.util.List<AbstractFileFilter> getAvailableFilters()
public AbstractFileFilter getActiveFileFilter()
public boolean isGenerateThumbnails()
public void setGenerateThumbnails(boolean generate)
generate
- whether file thumbnails should be generated or notpublic void setApproveButtonText(FileApproveText approveText)
approveText
- approve button text typepublic void setApproveButtonLanguage(java.lang.String key)
key
- approve button language keypublic WebFileChooserUI getWebUI()
public void updateUI()
updateUI
in class javax.swing.JFileChooser
public void setLanguage(java.lang.String key, java.lang.Object... data)
setLanguage
in interface LanguageMethods
key
- language record keydata
- formatting datapublic void updateLanguage(java.lang.Object... data)
updateLanguage
in interface LanguageMethods
data
- new formatting datapublic void updateLanguage(java.lang.String key, java.lang.Object... data)
updateLanguage
in interface LanguageMethods
key
- new language keydata
- new formatting datapublic void removeLanguage()
removeLanguage
in interface LanguageMethods
public boolean isLanguageSet()
isLanguageSet
in interface LanguageMethods
public void setLanguageUpdater(LanguageUpdater updater)
setLanguageUpdater
in interface LanguageMethods
updater
- component language updaterpublic void removeLanguageUpdater()
removeLanguageUpdater
in interface LanguageMethods
public void setLanguageContainerKey(java.lang.String key)
setLanguageContainerKey
in interface LanguageContainerMethods
key
- language container keypublic void removeLanguageContainerKey()
removeLanguageContainerKey
in interface LanguageContainerMethods
public java.lang.String getLanguageContainerKey()
getLanguageContainerKey
in interface LanguageContainerMethods
public static java.io.File showOpenDialog()
public static java.io.File showOpenDialog(Customizer<WebFileChooser> customizer)
customizer
- file chooser customizer
public static java.io.File showOpenDialog(java.awt.Component parent, Customizer<WebFileChooser> customizer)
parent
- parent componentcustomizer
- file chooser customizer
public static java.io.File showOpenDialog(java.lang.String currentDirectory, Customizer<WebFileChooser> customizer)
currentDirectory
- current file chooser directorycustomizer
- file chooser customizer
public static java.io.File showOpenDialog(java.awt.Component parent, java.lang.String currentDirectory)
parent
- parent componentcurrentDirectory
- current file chooser directory
public static java.io.File showOpenDialog(java.awt.Component parent, java.lang.String currentDirectory, Customizer<WebFileChooser> customizer)
parent
- parent componentcurrentDirectory
- current file chooser directorycustomizer
- file chooser customizer
public static java.util.List<java.io.File> showMultiOpenDialog()
public static java.util.List<java.io.File> showMultiOpenDialog(Customizer<WebFileChooser> customizer)
customizer
- file chooser customizer
public static java.util.List<java.io.File> showMultiOpenDialog(java.awt.Component parent, Customizer<WebFileChooser> customizer)
parent
- parent componentcustomizer
- file chooser customizer
public static java.util.List<java.io.File> showMultiOpenDialog(java.lang.String currentDirectory, Customizer<WebFileChooser> customizer)
currentDirectory
- current file chooser directorycustomizer
- file chooser customizer
public static java.util.List<java.io.File> showMultiOpenDialog(java.awt.Component parent, java.lang.String currentDirectory)
parent
- parent componentcurrentDirectory
- current file chooser directory
public static java.util.List<java.io.File> showMultiOpenDialog(java.awt.Component parent, java.lang.String currentDirectory, Customizer<WebFileChooser> customizer)
parent
- parent componentcurrentDirectory
- current file chooser directorycustomizer
- file chooser customizer
public static java.io.File showSaveDialog()
public static java.io.File showSaveDialog(Customizer<WebFileChooser> customizer)
customizer
- file chooser customizer
public static java.io.File showSaveDialog(java.awt.Component parent, Customizer<WebFileChooser> customizer)
parent
- parent componentcustomizer
- file chooser customizer
public static java.io.File showSaveDialog(java.lang.String currentDirectory, Customizer<WebFileChooser> customizer)
currentDirectory
- current file chooser directorycustomizer
- file chooser customizer
public static java.io.File showSaveDialog(java.awt.Component parent, java.lang.String currentDirectory)
parent
- parent componentcurrentDirectory
- current file chooser directory
public static java.io.File showSaveDialog(java.awt.Component parent, java.lang.String currentDirectory, Customizer<WebFileChooser> customizer)
parent
- parent componentcurrentDirectory
- current file chooser directorycustomizer
- file chooser customizer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |