Top Description Inners Fields Constructors Methods
sun.swing.plaf.synth

public abstract Class SynthFileChooserUI

extends BasicFileChooserUI
implements SynthUI
Class Inheritance
All Implemented Interfaces
javax.swing.plaf.synth.SynthUI, javax.swing.plaf.synth.SynthConstants
Known Direct Subclasses
sun.swing.plaf.synth.SynthFileChooserUIImpl, com.sun.java.swing.plaf.gtk.GTKFileChooserUI
Imports
javax.swing.plaf.synth.*, java.awt.*, java.awt.event.*, java.beans.*, java.io.File, java.util.regex.*, javax.swing.*, javax.swing.border.*, javax.swing.event.*, javax.swing.filechooser.*, javax.swing.plaf.*, javax.swing.plaf.basic.BasicFileChooserUI

Synth FileChooserUI.

Note

This class is abstract. It does not actually create the file chooser GUI.

Note that the classes in the com.sun.java.swing.plaf.synth package are not part of the core Java APIs. They are a part of Sun's JDK and JRE distributions. Although other licensees may choose to distribute these classes, developers cannot depend on their availability in non-Sun implementations. Additionally this API may change in incompatible ways between releases. While this class is public, it should be considered an implementation detail, and subject to change.

Authors
Leif Samuelsson, Jeff Dinkins

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private class
SynthFileChooserUI.FileNameCompletionAction

Responds to a File Name completion request (e.g. Tab)

pack-priv static class
private class
private class

Field Summary

Modifier and TypeField and Description
private FileFilter
private JButton
private JButton
private Action
private String
private SynthFileChooserUI.GlobFilter
private SynthStyle
Inherited from javax.swing.plaf.basic.BasicFileChooserUI:
cancelButtonMnemoniccancelButtonTextcancelButtonToolTipTextcomputerIcondetailsViewIcondirectoryIcondirectoryOpenButtonMnemonicdirectoryOpenButtonTextdirectoryOpenButtonToolTipTextfileIconfloppyDriveIconhardDriveIconhelpButtonMnemonichelpButtonTexthelpButtonToolTipTexthomeFolderIconlistViewIconnewFolderIconopenButtonMnemonicopenButtonTextopenButtonToolTipTextsaveButtonMnemonicsaveButtonTextsaveButtonToolTipTextupdateButtonMnemonicupdateButtonTextupdateButtonToolTipTextupFolderIconviewMenuIcon

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
protected abstract ActionMap
public PropertyChangeListener
public static ComponentUI
createUI(JComponent
the JFileChooser which needs a UI
c
)

Hides javax.swing.plaf.basic.BasicFileChooserUI.createUI.

Creates a BasicFileChooserUI implementation for the specified component.
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected JButton
getApproveButton(JFileChooser
the file chooser
fc
)

Overrides javax.swing.plaf.basic.BasicFileChooserUI.getApproveButton.

Returns the approve button.
protected JButton
private String
private int
public SynthContext
getContext(JComponent
Component requesting SynthContext.
c
)

Implements javax.swing.plaf.synth.SynthUI.getContext.

Returns the Context for the specified component.
protected SynthContext
getContext(JComponent c, int state)

public abstract String
public Action
private Region
public void
protected void
installDefaults(JFileChooser
the file chooser
fc
)

Overrides javax.swing.plaf.basic.BasicFileChooserUI.installDefaults.

Installs the defaults.
protected void
installIcons(JFileChooser
the file chooser
fc
)

Overrides javax.swing.plaf.basic.BasicFileChooserUI.installIcons.

Installs the icons.
protected void
public void
private static boolean
public void
paint(Graphics
the Graphics context in which to paint
g
,
JComponent
the component being painted; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
c
)

Overrides javax.swing.plaf.ComponentUI.paint.

Paints the specified component appropriately for the look and feel.
protected void
public void
paintBorder(SynthContext
a component context
context
,
Graphics
Graphics to paint on
g
,
int
the X coordinate
x
,
int
the Y coordinate
y
,
int
width of the border
w
,
int
height of the border
h
)

Implements javax.swing.plaf.synth.SynthUI.paintBorder.

Paints the border.
private void
public abstract void
setFileName(String
the file name
fileName
)

Overrides javax.swing.plaf.basic.BasicFileChooserUI.setFileName.

Sets the file name.
public void
protected void
public void
update(Graphics
the Graphics context in which to paint
g
,
JComponent
the component being painted; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
c
)

Overrides javax.swing.plaf.ComponentUI.update.

Notifies this UI delegate that it is time to paint the specified component.
private void
private void
Inherited from javax.swing.plaf.basic.BasicFileChooserUI:
createDoubleClickListenercreateListSelectionListenercreateModelensureFileIsVisiblegetAcceptAllFileFiltergetAccessoryPanelgetApproveButtonMnemonicgetApproveButtonTextgetApproveButtonToolTipTextgetApproveSelectionActiongetCancelSelectionActiongetChangeToParentDirectoryActiongetDefaultButtongetDialogTitlegetDirectorygetDirectoryNamegetFileChoosergetFileViewgetGoHomeActiongetModelgetNewFolderActiongetUpdateActioninstallStringsisDirectorySelectedrescanCurrentDirectorysetDirectorysetDirectoryNamesetDirectorySelecteduninstallIconsuninstallListenersuninstallStringsuninstallUI

Field Detail

actualFileFilterback to summary
private FileFilter actualFileFilter

Hides javax.swing.plaf.basic.BasicFileChooserUI.actualFileFilter.

approveButtonback to summary
private JButton approveButton
cancelButtonback to summary
private JButton cancelButton
fileNameCompletionActionback to summary
private Action fileNameCompletionAction
fileNameCompletionStringback to summary
private String fileNameCompletionString
globFilterback to summary
private SynthFileChooserUI.GlobFilter globFilter

Hides javax.swing.plaf.basic.BasicFileChooserUI.globFilter.

styleback to summary
private SynthStyle style

Constructor Detail

SynthFileChooserUIback to summary
public SynthFileChooserUI(JFileChooser b)

Method Detail

clearIconCacheback to summary
public void clearIconCache()

Overrides javax.swing.plaf.basic.BasicFileChooserUI.clearIconCache.

Doc from javax.swing.plaf.basic.BasicFileChooserUI.clearIconCache.

Clears the icon cache.

createActionMapback to summary
protected abstract ActionMap createActionMap()

Hides javax.swing.plaf.basic.BasicFileChooserUI.createActionMap.

createPropertyChangeListenerback to summary
public PropertyChangeListener createPropertyChangeListener(JFileChooser fc)

Overrides javax.swing.plaf.basic.BasicFileChooserUI.createPropertyChangeListener.

Doc from javax.swing.plaf.basic.BasicFileChooserUI.createPropertyChangeListener.

Creates the property change listener.

Parameters
fc:JFileChooser

the file chooser

Returns:PropertyChangeListener

the property change listener

createUIback to summary
public static ComponentUI createUI(JComponent c)

Hides javax.swing.plaf.basic.BasicFileChooserUI.createUI.

Doc from javax.swing.plaf.basic.BasicFileChooserUI.createUI.

Creates a BasicFileChooserUI implementation for the specified component. By default the BasicLookAndFeel class uses createUI methods of all basic UIs classes to instantiate UIs.

Parameters
c:JComponent

the JFileChooser which needs a UI

Returns:ComponentUI

the BasicFileChooserUI object

doAccessoryChangedback to summary
protected void doAccessoryChanged(PropertyChangeEvent e)
doAncestorChangedback to summary
protected void doAncestorChanged(PropertyChangeEvent e)
doControlButtonsChangedback to summary
protected void doControlButtonsChanged(PropertyChangeEvent e)
doDirectoryChangedback to summary
protected void doDirectoryChanged(PropertyChangeEvent e)
doFileSelectionModeChangedback to summary
protected void doFileSelectionModeChanged(PropertyChangeEvent e)
doMultiSelectionChangedback to summary
protected void doMultiSelectionChanged(PropertyChangeEvent e)
doSelectedFileChangedback to summary
protected void doSelectedFileChanged(PropertyChangeEvent e)
doSelectedFilesChangedback to summary
protected void doSelectedFilesChanged(PropertyChangeEvent e)
getApproveButtonback to summary
protected JButton getApproveButton(JFileChooser fc)

Overrides javax.swing.plaf.basic.BasicFileChooserUI.getApproveButton.

Doc from javax.swing.plaf.basic.BasicFileChooserUI.getApproveButton.

Returns the approve button.

Parameters
fc:JFileChooser

the file chooser

Returns:JButton

the approve button

getCancelButtonback to summary
protected JButton getCancelButton(JFileChooser fc)
getCommonStartStringback to summary
private String getCommonStartString(File[] files)
getComponentStateback to summary
private int getComponentState(JComponent c)
getContextback to summary
public SynthContext getContext(JComponent c)

Implements javax.swing.plaf.synth.SynthUI.getContext.

Doc from javax.swing.plaf.synth.SynthUI.getContext.

Returns the Context for the specified component.

Parameters
c:JComponent

Component requesting SynthContext.

Returns:SynthContext

SynthContext describing component.

getContextback to summary
protected SynthContext getContext(JComponent c, int state)
getFileNameback to summary
public abstract String getFileName()

Overrides javax.swing.plaf.basic.BasicFileChooserUI.getFileName.

Doc from javax.swing.plaf.basic.BasicFileChooserUI.getFileName.

Returns the file name.

Returns:String

the file name

getFileNameCompletionActionback to summary
public Action getFileNameCompletionAction()
getRegionback to summary
private Region getRegion(JComponent c)
installComponentsback to summary
public void installComponents(JFileChooser fc)

Overrides javax.swing.plaf.basic.BasicFileChooserUI.installComponents.

Doc from javax.swing.plaf.basic.BasicFileChooserUI.installComponents.

Installs the components.

Parameters
fc:JFileChooser

the file chooser

installDefaultsback to summary
protected void installDefaults(JFileChooser fc)

Overrides javax.swing.plaf.basic.BasicFileChooserUI.installDefaults.

Doc from javax.swing.plaf.basic.BasicFileChooserUI.installDefaults.

Installs the defaults.

Parameters
fc:JFileChooser

the file chooser

installIconsback to summary
protected void installIcons(JFileChooser fc)

Overrides javax.swing.plaf.basic.BasicFileChooserUI.installIcons.

Doc from javax.swing.plaf.basic.BasicFileChooserUI.installIcons.

Installs the icons.

Parameters
fc:JFileChooser

the file chooser

installListenersback to summary
protected void installListeners(JFileChooser fc)

Overrides javax.swing.plaf.basic.BasicFileChooserUI.installListeners.

Doc from javax.swing.plaf.basic.BasicFileChooserUI.installListeners.

Installs the listeners.

Parameters
fc:JFileChooser

the file chooser

installUIback to summary
public void installUI(JComponent c)

Overrides javax.swing.plaf.basic.BasicFileChooserUI.installUI.

Doc from javax.swing.plaf.basic.BasicFileChooserUI.installUI.

Installs the UI.

Parameters
c:JComponent

the component

isGlobPatternback to summary
private static boolean isGlobPattern(String fileName)

Hides javax.swing.plaf.basic.BasicFileChooserUI.isGlobPattern.

paintback to summary
public void paint(Graphics g, JComponent c)

Overrides javax.swing.plaf.ComponentUI.paint.

Doc from javax.swing.plaf.ComponentUI.paint.

Paints the specified component appropriately for the look and feel. This method is invoked from the ComponentUI.update method when the specified component is being painted. Subclasses should override this method and use the specified Graphics object to render the content of the component.

Parameters
g:Graphics

the Graphics context in which to paint

c:JComponent

the component being painted; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components

paintback to summary
protected void paint(SynthContext context, Graphics g)
paintBorderback to summary
public void paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h)

Implements javax.swing.plaf.synth.SynthUI.paintBorder.

Doc from javax.swing.plaf.synth.SynthUI.paintBorder.

Paints the border.

Parameters
context:SynthContext

a component context

g:Graphics

Graphics to paint on

x:int

the X coordinate

y:int

the Y coordinate

w:int

width of the border

h:int

height of the border

resetGlobFilterback to summary
private void resetGlobFilter()

Hides javax.swing.plaf.basic.BasicFileChooserUI.resetGlobFilter.

setFileNameback to summary
public abstract void setFileName(String fileName)

Overrides javax.swing.plaf.basic.BasicFileChooserUI.setFileName.

Doc from javax.swing.plaf.basic.BasicFileChooserUI.setFileName.

Sets the file name.

Parameters
fileName:String

the file name

uninstallComponentsback to summary
public void uninstallComponents(JFileChooser fc)

Overrides javax.swing.plaf.basic.BasicFileChooserUI.uninstallComponents.

Doc from javax.swing.plaf.basic.BasicFileChooserUI.uninstallComponents.

Uninstalls the components.

Parameters
fc:JFileChooser

the file chooser

uninstallDefaultsback to summary
protected void uninstallDefaults(JFileChooser fc)

Overrides javax.swing.plaf.basic.BasicFileChooserUI.uninstallDefaults.

Doc from javax.swing.plaf.basic.BasicFileChooserUI.uninstallDefaults.

Uninstalls the defaults.

Parameters
fc:JFileChooser

the file chooser

updateback to summary
public void update(Graphics g, JComponent c)

Overrides javax.swing.plaf.ComponentUI.update.

Doc from javax.swing.plaf.ComponentUI.update.

Notifies this UI delegate that it is time to paint the specified component. This method is invoked by JComponent when the specified component is being painted.

By default this method fills the specified component with its background color if its opaque property is true, and then immediately calls paint. In general this method need not be overridden by subclasses; all look-and-feel rendering code should reside in the paint method.

Parameters
g:Graphics

the Graphics context in which to paint

c:JComponent

the component being painted; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components

updateFileNameCompletionback to summary
private void updateFileNameCompletion()
updateStyleback to summary
private void updateStyle(JComponent c)
sun.swing.plaf.synth back to summary

private Class SynthFileChooserUI.DelayedSelectionUpdater

extends Object
implements Runnable
Class Inheritance
  • java.lang.Object
  • sun.swing.plaf.synth.SynthFileChooserUI.DelayedSelectionUpdater
All Implemented Interfaces
java.lang.Runnable

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
run()

Implements java.lang.Runnable.run.

Runs this operation.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

DelayedSelectionUpdaterback to summary
pack-priv DelayedSelectionUpdater()

Method Detail

runback to summary
public void run()

Implements java.lang.Runnable.run.

Doc from java.lang.Runnable.run.

Runs this operation.

sun.swing.plaf.synth back to summary

private Class SynthFileChooserUI.FileNameCompletionAction

extends AbstractAction
Class Inheritance
Annotations
@SuppressWarnings:serial

Responds to a File Name completion request (e.g. Tab)

Field Summary

Inherited from javax.swing.AbstractAction:
changeSupportenabled

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public void
actionPerformed(ActionEvent
the event to be processed
e
)

Implements java.awt.event.ActionListener.actionPerformed.

Invoked when an action occurs.
Inherited from javax.swing.AbstractAction:
addPropertyChangeListenerclonefirePropertyChangegetKeysgetPropertyChangeListenersgetValueisEnabledputValueremovePropertyChangeListenersetEnabled

Constructor Detail

FileNameCompletionActionback to summary
protected FileNameCompletionAction()

Method Detail

actionPerformedback to summary
public void actionPerformed(ActionEvent e)

Implements java.awt.event.ActionListener.actionPerformed.

Doc from java.awt.event.ActionListener.actionPerformed.

Invoked when an action occurs.

Parameters
e:ActionEvent

the event to be processed

sun.swing.plaf.synth back to summary

pack-priv Class SynthFileChooserUI.GlobFilter

extends FileFilter
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv String
pack-priv Pattern

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public boolean
accept(File
the File to test
f
)

Implements abstract javax.swing.filechooser.FileFilter.accept.

Whether the given file is accepted by this filter.
public String
getDescription()

Implements abstract javax.swing.filechooser.FileFilter.getDescription.

The description of this filter.
public void
setPattern(String globPattern)

Field Detail

globPatternback to summary
pack-priv String globPattern
patternback to summary
pack-priv Pattern pattern

Constructor Detail

GlobFilterback to summary
pack-priv GlobFilter()

Method Detail

acceptback to summary
public boolean accept(File f)

Implements abstract javax.swing.filechooser.FileFilter.accept.

Doc from javax.swing.filechooser.FileFilter.accept.

Whether the given file is accepted by this filter.

Parameters
f:File

the File to test

Returns:boolean

true if the file is to be accepted

getDescriptionback to summary
public String getDescription()

Implements abstract javax.swing.filechooser.FileFilter.getDescription.

Doc from javax.swing.filechooser.FileFilter.getDescription.

The description of this filter. For example: "JPG and GIF Images"

Returns:String

the description of this filter

setPatternback to summary
public void setPattern(String globPattern)
sun.swing.plaf.synth back to summary

private Class SynthFileChooserUI.SynthFCPropertyChangeListener

extends Object
implements PropertyChangeListener
Class Inheritance
  • java.lang.Object
  • sun.swing.plaf.synth.SynthFileChooserUI.SynthFCPropertyChangeListener
All Implemented Interfaces
java.beans.PropertyChangeListener, java.util.EventListener

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
propertyChange(PropertyChangeEvent
A PropertyChangeEvent object describing the event source and the property that has changed.
e
)

Implements java.beans.PropertyChangeListener.propertyChange.

This method gets called when a bound property is changed.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

SynthFCPropertyChangeListenerback to summary
private SynthFCPropertyChangeListener()

Method Detail

propertyChangeback to summary
public void propertyChange(PropertyChangeEvent e)

Implements java.beans.PropertyChangeListener.propertyChange.

Doc from java.beans.PropertyChangeListener.propertyChange.

This method gets called when a bound property is changed.

Parameters
e:PropertyChangeEvent

A PropertyChangeEvent object describing the event source and the property that has changed.

sun.swing.plaf.synth back to summary

private Class SynthFileChooserUI.UIBorder

extends AbstractBorder
implements UIResource
Class Inheritance
All Implemented Interfaces
javax.swing.plaf.UIResource
Annotations
@SuppressWarnings:serial

Field Summary

Modifier and TypeField and Description
private Insets

Constructor Summary

AccessConstructor and Description
pack-priv
UIBorder(Insets insets)

Method Summary

Modifier and TypeMethod and Description
public Insets
getBorderInsets(Component
the component for which this border insets value applies
c
,
Insets
the object to be reinitialized
insets
)

Overrides javax.swing.border.AbstractBorder.getBorderInsets.

Reinitializes the insets parameter with this Border's current Insets.
public boolean
isBorderOpaque()

Overrides javax.swing.border.AbstractBorder.isBorderOpaque.

Implements javax.swing.border.Border.isBorderOpaque.

This default implementation returns false.
public void
paintBorder(Component
the component for which this border is being painted
c
,
Graphics
the paint graphics
g
,
int
the x position of the painted border
x
,
int
the y position of the painted border
y
,
int
the width of the painted border
width
,
int
the height of the painted border
height
)

Overrides javax.swing.border.AbstractBorder.paintBorder.

Implements javax.swing.border.Border.paintBorder.

This default implementation does no painting.
Inherited from javax.swing.border.AbstractBorder:
getBaselinegetBaselineResizeBehaviorgetBorderInsetsgetInteriorRectanglegetInteriorRectangle

Field Detail

_insetsback to summary
private Insets _insets

Constructor Detail

UIBorderback to summary
pack-priv UIBorder(Insets insets)

Method Detail

getBorderInsetsback to summary
public Insets getBorderInsets(Component c, Insets insets)

Overrides javax.swing.border.AbstractBorder.getBorderInsets.

Doc from javax.swing.border.AbstractBorder.getBorderInsets.

Reinitializes the insets parameter with this Border's current Insets.

Parameters
c:Component

the component for which this border insets value applies

insets:Insets

the object to be reinitialized

Returns:Insets

the insets object

isBorderOpaqueback to summary
public boolean isBorderOpaque()

Overrides javax.swing.border.AbstractBorder.isBorderOpaque.

Implements javax.swing.border.Border.isBorderOpaque.

Doc from javax.swing.border.AbstractBorder.isBorderOpaque.

This default implementation returns false.

Returns:boolean

false

paintBorderback to summary
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)

Overrides javax.swing.border.AbstractBorder.paintBorder.

Implements javax.swing.border.Border.paintBorder.

Doc from javax.swing.border.AbstractBorder.paintBorder.

This default implementation does no painting.

Parameters
c:Component

the component for which this border is being painted

g:Graphics

the paint graphics

x:int

the x position of the painted border

y:int

the y position of the painted border

width:int

the width of the painted border

height:int

the height of the painted border