APIdia Launch Partner
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 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
protected JButton
private String
private int
public SynthContext
getContext(JComponent 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
protected void
protected void
public void
private static boolean
public void
paint(Graphics g, JComponent c)

Overrides javax.swing.plaf.ComponentUI.paint.

Paints the specified component appropriately for the look and feel.

protected void
public void
paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h)

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

Paints the border.

private void
public abstract void
public void
protected void
public void
update(Graphics g, JComponent 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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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 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.

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 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.

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"

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 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.

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 c, Insets 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 c, Graphics g, int x, int y, int width, int 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.

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.

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.