2362N/A * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * Windows L&F implementation of a FileChooser. 0N/A * @author Jeff Dinkins 0N/A // The following are private because the implementation of the 0N/A // Windows FileChooser L&F is not complete yet. 0N/A // Preferred and Minimum sizes for the dialog box 0N/A // Labels, mnemonics, and tooltips (oh my!) 0N/A // ComponentUI Interface Implementation methods 0N/A // ********************************* // 0N/A // **** Construct the top panel **** // 0N/A // ********************************* // 0N/A // Directory manipulation buttons 0N/A // Add the top panel to the fileChooser 0N/A // CurrentDir ComboBox 0N/A // Must be small enough to not affect total width. 0N/A // New Directory Button 1639N/A // Create icon for viewMenuButton 1639N/A // Forbid keyboard actions if the button is not in rollover state 0N/A // ************************************** // 0N/A // ******* Add the directory pane ******* // 0N/A // ************************************** // 0N/A // ********************************** // 0N/A // **** Construct the bottom panel ** // 0N/A // ********************************** // 0N/A // Add the bottom panel to file chooser 0N/A // file entry and filters 0N/A // Decide whether to use the ShellFolder class to populate shortcut 0N/A // panel and combobox. 0N/A * Creates a selection listener for the list of files and directories. 0N/A * @param fc a <code>JFileChooser</code> 0N/A * @return a <code>ListSelectionListener</code> 0N/A // Obsolete class, not used in this version. 0N/A // Obsolete class, not used in this version. 0N/A // Obsolete class, not used in this version. 0N/A * Returns the preferred size of the specified 0N/A * <code>JFileChooser</code>. 0N/A * The preferred size is at least as large, 0N/A * in both height and width, 0N/A * as the preferred size recommended 0N/A * by the file chooser's layout manager. 0N/A * @param c a <code>JFileChooser</code> 0N/A * @return a <code>Dimension</code> specifying the preferred 0N/A * width and height of the file chooser 0N/A * Returns the minimum size of the <code>JFileChooser</code>. 0N/A * @param c a <code>JFileChooser</code> 0N/A * @return a <code>Dimension</code> specifying the minimum 0N/A * width and height of the file chooser 0N/A * Returns the maximum size of the <code>JFileChooser</code>. 0N/A * @param c a <code>JFileChooser</code> 0N/A * @return a <code>Dimension</code> specifying the maximum 0N/A * width and height of the file chooser 0N/A /* The following methods are used by the PropertyChange Listener */ 0N/A * Listen for filechooser property changes, such as 0N/A * the selected file changing, or the type of the dialog changing. 0N/A }
else if (s ==
"FileChooser.useShellFolder") {
0N/A }
else if (s.
equals(
"componentOrientation")) {
0N/A // Ancestor was added, set initial focus 0N/A * Property to remember whether a directory is currently selected in the UI. 0N/A * This is normally called by the UI on a selection event. 0N/A * @param directorySelected if a directory is currently selected. 0N/A // PENDING(jeff) - get the name from the directory combobox 0N/A // PENDING(jeff) - set the name in the directory combobox 1639N/A // Forbid keyboard actions if the button is not in rollover state 0N/A // Renderer for DirectoryComboBox 0N/A // DataModel for DirectoryComboxbox 0N/A * Data model for a type-face selection combo-box. 0N/A // Add the current directory to the model, and make it the 0N/A // selectedDirectory 0N/A * Adds the directory to the model and sets it to be selected, 0N/A * additionally clears out the previous selected directory and 0N/A * the paths leading up to it, if any. 0N/A // Get the canonical (full) path. This has the side 0N/A // benefit of removing extraneous chars from the path, 0N/A // Maybe drive is not ready. Can't abort here. 0N/A // create File instances of each directory leading up to the top 0N/A // Insert chain at appropriate place in vector 0N/A for (
int j = i-
1; j >=
0; j--) {
0N/A for (
int j = i-
1; j >=
0; j--) {
0N/A // Renderer for Types ComboBox 0N/A * Render different type sizes and styles. 0N/A // DataModel for Types Comboxbox 0N/A * Data model for a type-face selection combo-box. 0N/A // Ensure that the current filter is in the list. 0N/A // NOTE: we shouldnt' have to do this, since JFileChooser adds 0N/A // the filter to the choosable filters list when the filter 0N/A // is set. Lets be paranoid just in case someone overrides 0N/A // setFileFilter in JFileChooser. 0N/A // This shouldn't happen. Try to recover gracefully. 0N/A * Acts when DirectoryComboBox has changed the selected item. 0N/A // *********************** 0N/A // * FileView operations * 0N/A // *********************** 0N/A /* FileView type descriptions */