diff options
author | Michael Koch <konqueror@gmx.de> | 2003-06-24 20:17:27 +0000 |
---|---|---|
committer | Michael Koch <konqueror@gmx.de> | 2003-06-24 20:17:27 +0000 |
commit | 428e542390f5d5bd1e6c6037b75a095be83e9bb3 (patch) | |
tree | 8d80296e8b413cdaf683251d6bff73920ddd04ee /libjava/javax/swing/plaf/FileChooserUI.java | |
parent | c44a40f4df3f1f6272508c062d3ef305e0e11aaa (diff) |
2003-06-24 Michael Koch <konqueror@gmx.de>
* javax/swing/event/AncestorEvent.java,
javax/swing/event/HyperlinkEvent.java,
javax/swing/event/InternalFrameEvent.java,
javax/swing/event/ListDataEvent.java,
javax/swing/event/TableModelEvent.java,
javax/swing/event/TreeWillExpandListener.java,
javax/swing/plaf/ComponentUI.java,
javax/swing/plaf/DesktopIconUI.java,
javax/swing/plaf/DesktopPaneUI.java,
javax/swing/plaf/DimensionUIResource.java,
javax/swing/plaf/FileChooserUI.java,
javax/swing/plaf/FontUIResource.java,
javax/swing/plaf/IconUIResource.java,
javax/swing/plaf/InputMapUIResource.java,
javax/swing/plaf/InsetsUIResource.java,
javax/swing/plaf/InternalFrameUI.java,
javax/swing/plaf/LabelUI.java,
javax/swing/plaf/ListUI.java,
javax/swing/plaf/MenuBarUI.java,
javax/swing/plaf/MenuItemUI.java,
javax/swing/plaf/OptionPaneUI.java,
javax/swing/plaf/PanelUI.java,
javax/swing/plaf/ProgressBarUI.java,
javax/swing/plaf/doc-files/ComponentUI-1.dia,
javax/swing/plaf/doc-files/ComponentUI-1.png:
New versions from classpath.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@68438 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/javax/swing/plaf/FileChooserUI.java')
-rw-r--r-- | libjava/javax/swing/plaf/FileChooserUI.java | 163 |
1 files changed, 94 insertions, 69 deletions
diff --git a/libjava/javax/swing/plaf/FileChooserUI.java b/libjava/javax/swing/plaf/FileChooserUI.java index 00595eb7c66..193362ee605 100644 --- a/libjava/javax/swing/plaf/FileChooserUI.java +++ b/libjava/javax/swing/plaf/FileChooserUI.java @@ -1,5 +1,5 @@ /* FileChooserUI.java -- - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -37,75 +37,100 @@ exception statement from your version. */ package javax.swing.plaf; -// Imports -import java.io.*; -import javax.swing.*; -import javax.swing.filechooser.*; +import java.io.File; +import javax.swing.JFileChooser; import javax.swing.filechooser.FileFilter; +import javax.swing.filechooser.FileView; /** - * FileChooserUI - * @author Andrew Selkirk - * @version 1.0 + * An abstract base class for delegates that implement the pluggable + * look and feel for a <code>JFileChooser</code>. + * + * @see javax.swing.JFileChooser + * + * @author Andrew Selkirk (aselkirk@sympatico.ca) + * @author Sascha Brawer (brawer@dandelis.ch) */ -public abstract class FileChooserUI extends ComponentUI { - - //------------------------------------------------------------- - // Initialization --------------------------------------------- - //------------------------------------------------------------- - - /** - * Constructor FileChooserUI - */ - public FileChooserUI() { - // TODO - } // FileChooserUI() - - - //------------------------------------------------------------- - // Methods ---------------------------------------------------- - //------------------------------------------------------------- - - /** - * getAcceptAllFileFilter - * @param chooser TODO - * @returns FileFilter - */ - public abstract FileFilter getAcceptAllFileFilter(JFileChooser chooser); - - /** - * getFileView - * @param chooser TODO - * @returns FileView - */ - public abstract FileView getFileView(JFileChooser chooser); - - /** - * getApproveButtonText - * @param chooser TODO - * @returns String - */ - public abstract String getApproveButtonText(JFileChooser chooser); - - /** - * getDialogTitle - * @param chooser TODO - * @returns String - */ - public abstract String getDialogTitle(JFileChooser chooser); - - /** - * rescanCurrentDirectory - * @param value0 TODO - */ - public abstract void rescanCurrentDirectory(JFileChooser chooser); - - /** - * ensureFileIsVisible - * @param chooser TODO - * @param file TODO - */ - public abstract void ensureFileIsVisible(JFileChooser chooser, File file); - - -} // FileChooserUI +public abstract class FileChooserUI + extends ComponentUI +{ + /** + * Constructs a new <code>FileChooserUI</code>. + */ + public FileChooserUI() + { + } + + + /** + * Returns a <code>FileFilter</code> that accepts every file. While + * the filtering itself is not specific to any look and feel, the + * text returned by <code>FileFilter.getDescription()</code> need + * not be the same across all look and feels. + * + * @param chooser the <code>JFileChooser</code> for which + * a <code>FileFilter</code> is requested. + * + * @see javax.swing.JFileChooser#getAcceptAllFileFilter + * @see javax.swing.filechooser.FileFilter#getDescription + */ + public abstract FileFilter getAcceptAllFileFilter(JFileChooser chooser); + + + /** + * Returns a view to a file, which is able to retrieve its name, + * icon, and other properties that are relevant for presenting + * the file to the user. + * + * @param chooser the <code>JFileChooser</code> for which + * a <code>FileFilter</code> is requested. + */ + public abstract FileView getFileView(JFileChooser chooser); + + + /** + * Determines which text is appropriate for the approve button + * according to the design guidelines of the implemented + * look and feel. + * + * @param chooser the <code>JFileChooser</code> whose + * button text is requested. + * + * @see javax.swing.JFileChoose#getApproveButtonText + */ + public abstract String getApproveButtonText(JFileChooser chooser); + + + /** + * Determines which text is appropriate for the title bar of a + * <code>JFileChooser</code> according to the design guidelines of + * the implemented look and feel. + * + * @param chooser the <code>JFileChooser</code> whose + * dialog title is requested. + * + * @see javax.swing.JFileChoose#getDialogtitle + */ + public abstract String getDialogTitle(JFileChooser chooser); + + + /** + * Refreshes the currently displayed directory. + * + * @param chooser the <code>JFileChooser</code> whose + * dialog title needs re-scanning. + */ + public abstract void rescanCurrentDirectory(JFileChooser chooser); + + + /** + * Ensures that a specified file is visible in the + * <code>JFileChooser</code> + * + * @param chooser the <code>JFileChooser</code> that + * should display the file <code>file</code>. + * + * @param file the file that needs to be made visible. + */ + public abstract void ensureFileIsVisible(JFileChooser chooser, File file); +} |