public class WebFileChooserUI extends javax.swing.plaf.FileChooserUI implements Styleable, ShapeProvider, MarginSupport, PaddingSupport
| Modifier and Type | Class and Description |
|---|---|
protected class |
WebFileChooserUI.WebFileView
Special FileView for file chooser.
|
| Modifier and Type | Field and Description |
|---|---|
protected javax.swing.JFileChooser |
fileChooser |
protected WebFileChooserPanel |
fileChooserPanel |
protected WebFileChooserUI.WebFileView |
fileView |
protected boolean |
ignoreFileSelectionChanges |
protected java.awt.Insets |
margin
Runtime variables.
|
protected java.awt.Insets |
padding |
protected IFileChooserPainter |
painter
Component painter.
|
protected java.beans.PropertyChangeListener |
propertyChangeListener
Listeners.
|
EMPTYEMPTY| Constructor and Description |
|---|
WebFileChooserUI()
Constructs new WebFileChooserUI.
|
| Modifier and Type | Method and Description |
|---|---|
protected WebFileChooserPanel |
createPanel(javax.swing.JFileChooser fileChooser) |
static javax.swing.plaf.ComponentUI |
createUI(javax.swing.JComponent c)
Returns an instance of the WebFileChooserUI for the specified component.
|
void |
ensureFileIsVisible(javax.swing.JFileChooser fc,
java.io.File f) |
javax.swing.filechooser.FileFilter |
getAcceptAllFileFilter(javax.swing.JFileChooser fc) |
com.alee.utils.filefilter.AbstractFileFilter |
getActiveFileFilter()
Returns currently active file filter.
|
java.lang.String |
getApproveButtonText(javax.swing.JFileChooser fc) |
java.util.List<com.alee.utils.filefilter.AbstractFileFilter> |
getAvailableFilters()
Returns list of available file filters.
|
java.lang.String |
getDialogTitle(javax.swing.JFileChooser fc) |
WebFileChooserPanel |
getFileChooserPanel()
Returns file chooser panel.
|
FileChooserType |
getFileChooserType()
Returns JFileChooser type converted into FileChooserType form.
|
javax.swing.filechooser.FileView |
getFileView(javax.swing.JFileChooser fc) |
java.awt.Insets |
getMargin()
Returns current margin.
|
java.awt.Insets |
getPadding()
Returns current padding.
|
Painter |
getPainter()
Returns file chooser painter.
|
StyleId |
getStyleId()
Returns component style ID.
|
void |
installUI(javax.swing.JComponent c)
Installs UI in the specified component.
|
boolean |
isGenerateThumbnails()
Returns whether file thumbnails are generated or not.
|
void |
paint(java.awt.Graphics g,
javax.swing.JComponent c) |
protected void |
propertyChanged(java.beans.PropertyChangeEvent event)
Fired when some of JFileChooser properties changes.
|
java.awt.Shape |
provideShape()
Returns component shape.
|
void |
rescanCurrentDirectory(javax.swing.JFileChooser fc) |
void |
setApproveButtonLanguage(java.lang.String key)
Sets approve button language key.
|
void |
setApproveButtonText(FileAcceptText approveText)
Sets approve button text type.
|
void |
setFileView(WebFileChooserUI.WebFileView fileView)
Sets file view.
|
void |
setGenerateThumbnails(boolean generate)
Sets whether file thumbnails should be generated or not.
|
void |
setMargin(java.awt.Insets margin)
Sets new margin.
|
void |
setPadding(java.awt.Insets padding)
Sets new padding.
|
void |
setPainter(Painter painter)
Sets file chooser painter.
|
StyleId |
setStyleId(StyleId id)
Sets new component style ID.
|
void |
uninstallUI(javax.swing.JComponent c)
Uninstalls UI from the specified component.
|
@DefaultPainter(value=FileChooserPainter.class) protected IFileChooserPainter painter
protected java.awt.Insets margin
protected java.awt.Insets padding
protected javax.swing.JFileChooser fileChooser
protected WebFileChooserUI.WebFileView fileView
protected WebFileChooserPanel fileChooserPanel
protected boolean ignoreFileSelectionChanges
protected java.beans.PropertyChangeListener propertyChangeListener
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
c - component that will use UI instanceprotected WebFileChooserPanel createPanel(javax.swing.JFileChooser fileChooser)
public void installUI(javax.swing.JComponent c)
installUI in class javax.swing.plaf.ComponentUIc - component for this UIpublic void uninstallUI(javax.swing.JComponent c)
uninstallUI in class javax.swing.plaf.ComponentUIc - component with this UIprotected void propertyChanged(java.beans.PropertyChangeEvent event)
event - property change eventpublic StyleId getStyleId()
StyleablegetStyleId in interface Styleablepublic StyleId setStyleId(StyleId id)
StyleablesetStyleId in interface Styleableid - custom component style IDpublic java.awt.Shape provideShape()
ShapeProviderprovideShape in interface ShapeProviderpublic java.awt.Insets getMargin()
MarginSupportgetMargin in interface MarginSupportpublic void setMargin(java.awt.Insets margin)
MarginSupportnull can be provided to set an empty [0,0,0,0] margin.setMargin in interface MarginSupportmargin - new marginpublic java.awt.Insets getPadding()
PaddingSupportgetPadding in interface PaddingSupportpublic void setPadding(java.awt.Insets padding)
PaddingSupportnull can be provided to set an empty [0,0,0,0] padding.setPadding in interface PaddingSupportpadding - new paddingpublic Painter getPainter()
public void setPainter(Painter painter)
painter - new file chooser painterpublic WebFileChooserPanel getFileChooserPanel()
public java.util.List<com.alee.utils.filefilter.AbstractFileFilter> getAvailableFilters()
public com.alee.utils.filefilter.AbstractFileFilter getActiveFileFilter()
public boolean isGenerateThumbnails()
public void setGenerateThumbnails(boolean generate)
generate - whether file thumbnails should be generated or notpublic void setApproveButtonText(FileAcceptText approveText)
approveText - approve button text typepublic void setApproveButtonLanguage(java.lang.String key)
key - approve button language keypublic javax.swing.filechooser.FileFilter getAcceptAllFileFilter(javax.swing.JFileChooser fc)
getAcceptAllFileFilter in class javax.swing.plaf.FileChooserUIpublic javax.swing.filechooser.FileView getFileView(javax.swing.JFileChooser fc)
getFileView in class javax.swing.plaf.FileChooserUIpublic void setFileView(WebFileChooserUI.WebFileView fileView)
fileView - new file viewpublic java.lang.String getApproveButtonText(javax.swing.JFileChooser fc)
getApproveButtonText in class javax.swing.plaf.FileChooserUIpublic java.lang.String getDialogTitle(javax.swing.JFileChooser fc)
getDialogTitle in class javax.swing.plaf.FileChooserUIpublic void rescanCurrentDirectory(javax.swing.JFileChooser fc)
rescanCurrentDirectory in class javax.swing.plaf.FileChooserUIpublic void ensureFileIsVisible(javax.swing.JFileChooser fc,
java.io.File f)
ensureFileIsVisible in class javax.swing.plaf.FileChooserUIpublic FileChooserType getFileChooserType()
public void paint(java.awt.Graphics g,
javax.swing.JComponent c)
paint in class javax.swing.plaf.ComponentUI