/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* FileView icons */
//private String newFolderErrorSeparator = null;
boolean selectionInProgress = false;
// The accessoryPanel is a container to place the JFileChooser accessory component
//
// ComponentUI Interface Implementation methods
//
return new AquaFileChooserUI((JFileChooser)c);
}
super();
}
filechooser = (JFileChooser)c;
createModel();
AquaUtils.enforceComponentOrientation(filechooser, ComponentOrientation.getOrientation(Locale.getDefault()));
}
if (accessoryPanel != null) {
}
getFileChooser().removeAll();
}
if (propertyChangeListener != null) {
}
ancestorListener = new AncestorListener(){
public void ancestorAdded(final AncestorEvent e) {
// Request defaultness for the appropriate button based on mode
// Request defaultness for the appropriate button based on mode
}
public void ancestorRemoved(final AncestorEvent e) {
}
public void ancestorMoved(final AncestorEvent e) {
}
};
fc.registerKeyboardAction(new CancelSelectionAction(), KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
}
if (propertyChangeListener != null) {
}
}
}
}
}
// Exist in basic.properties (though we might want to override)
newFolderErrorText = getString("FileChooser.newFolderErrorText", "Error occured during folder creation");
// Mac-specific, but fallback to basic if it's missing
// Mac-specific, required
newFolderExistsErrorText = getString("FileChooser.newFolderExistsErrorText", "That name is already taken");
} else {
}
// Mac-specific, optional
cancelNewFolderButtonToolTipText = UIManager.getString("FileChooser.cancelNewFolderButtonToolTipText");
}
}
computerIcon = null;
upFolderIcon = null;
listViewIcon = null;
}
desktopName = null;
}
protected void createModel() {
}
return model;
}
/*
* Listen for filechooser property changes, such as
* the selected file changing, or the type of the dialog changing.
*/
// Taken almost verbatim from Metal
return new PropertyChangeListener(){
public void propertyChange(final PropertyChangeEvent e) {
if (f != null) {
// Select the file in the list if the selected file didn't change as
// a result of a list click.
}
// [3643835] Need to populate the text field here. No-op on Open dialogs
// Note that this was removed for 3514735, but should not have been.
if (!f.isDirectory()) {
}
}
if (currentDirectory != null) {
// Enable the newFolder action if the current directory
// is writable.
// PENDING(jeff) - broken - fix
}
if (getAccessoryPanel() != null) {
if (e.getOldValue() != null) {
}
}
}
getFileChooser().invalidate();
} else {
}
// Mac doesn't show the text field or "new folder" button in 'Open' dialogs
if (getFileChooser().isMultiSelectionEnabled()) {
} else {
}
}
}
};
}
int newProp = -1;
}
int newProp = -1;
}
if (getFileChooser().getControlButtonsAreShown()) {
} else {
}
}
return null;
}
// PENDING(jeff) - get the name from the directory combobox
return null;
}
if (filenameTextField != null) {
}
}
// PENDING(jeff) - set the name in the directory combobox
}
}
if (f == null) {
return;
}
public void run() {
}
});
}
return filechooser;
}
return accessoryPanel;
}
return fApproveButton;
}
}
}
}
}
// If the item's not selectable, it'll be visible but disabled in the list
}
// Is this a file that the JFileChooser wants?
// Directories can be selected in the list regardless of mode
if (f == null) return false;
return !traversable;
}
// ********************************************
// ************ Create Listeners **************
// ********************************************
// From Basic
return new SelectionListener();
}
if (e.getValueIsAdjusting()) return;
if (selectedRow >= 0) {
}
// Save dialog lists can't be multi select, because all we're selecting is the next folder to open
selectionInProgress = true;
int selectableCount = 0;
// Double-check that all the list selections are valid for this mode
// Directories can be selected in the list regardless of mode
}
}
if (selectableCount > 0) {
if (isSelectableForMode(chooser, f)) {
f = fileView.resolveAlias(f);
}
}
}
} else {
}
} else {
}
selectionInProgress = false;
}
}
// When the Save textfield has the focus, the button should say "Save"
// Otherwise, it depends on the list selection
}
// Do nothing, we might be losing focus due to window deactivation
}
}
// When the Save textfield is empty and the button says "Save", it should be disabled
// Otherwise, it depends on the list selection
textChanged();
}
textChanged();
}
}
void textChanged() {
}
}
// Opens the File object if it's a traversable directory
if (getFileChooser().isTraversable(f)) {
// Resolve any aliases
return true;
}
return false;
}
// From Basic
}
if (e.getClickCount() != 2) return;
if (index < 0) return;
if (openDirectory(f)) return;
if (!isSelectableInList(f)) return;
}
}
protected MouseListener createDoubleClickListener(final JFileChooser fc, final JTableExtension list) {
return new DoubleClickListener(list);
}
// listens for drag events onto the JFileChooser and sets the selected file or directory
}
}
}
return;
}
return;
}
}
if (dtde.isDataFlavorSupported(DataFlavor.javaFileListFlavor) || dtde.isDataFlavorSupported(DataFlavor.stringFlavor)) {
return;
}
dtde.rejectDrag();
}
try {
final java.util.List<File> fileList = (java.util.List<File>)transferable.getTransferData(DataFlavor.javaFileListFlavor);
dtde.dropComplete(true);
} catch (final Exception e) {
dtde.dropComplete(false);
}
}
final String stringData;
try {
} catch (final Exception e) {
dtde.dropComplete(false);
return;
}
try {
if (fileAsPath.exists()) {
dtde.dropComplete(true);
return;
}
} catch (final Exception e) {
// try again
}
try {
dtde.dropComplete(true);
return;
}
} catch (final Exception e) {
// nothing more to do
}
dtde.dropComplete(false);
}
return;
}
return;
}
}
}
public void run() {
}
}
});
}
}
// FileChooser UI PLAF methods
/**
* Returns the default accept all file filter
*/
return acceptAllFileFilter;
}
return fileView;
}
/**
* Returns the title of this dialog
*/
return openTitleText;
}
return fc.getDialogTitle();
}
// Utility to get the first selected item regardless of whether we're single or multi select
// Get the selected item
if (index >= 0) {
}
return selectedFile;
}
// Make a file from the filename
// whitespace is legal on Macs, even on beginning and end of filename
if (!selectedFile.isAbsolute()) {
}
}
return selectedFile;
}
// Utility to tell if the textfield has anything in it
boolean textfieldIsValid() {
final String s = getFileName();
}
// Action to attach to the file list so we can override the default action
// of the table for the return key, which is to select the next line.
} else if (!fc.getControlButtonsAreShown()) {
if (defaultButton != null) {
}
} else {
}
}
public boolean isEnabled() {
return true;
}
}
/**
* Creates a new folder.
*/
protected NewFolderAction() {
super(newFolderAccessibleName);
}
// Muchlike showInputDialog, but we give it options instead of selectionValues
private Object showNewFolderDialog(final Component parentComponent, final Object message, final String title, final int messageType, final Icon icon, final Object[] options, final Object initialSelectionValue) {
final JOptionPane pane = new JOptionPane(message, messageType, JOptionPane.OK_CANCEL_OPTION, icon, options, null);
pane.setWantsInput(true);
dialog.setVisible(true);
return null;
}
return pane.getInputValue();
}
newFolderDialogPrompt, // message
newFolderTitleText, // title
null, // icon
options, // selectionValues
newFolderDefaultName); // initialSelectionValue
try {
return;
}
return;
}
}
}
}
/**
* Responds to an Open, Save, or Choose request
*/
}
}
/**
* Responds to an OpenDirectory request
*/
if (index >= 0) {
}
}
}
/**
* Responds to a cancel request.
*/
}
public boolean isEnabled() {
return getFileChooser().isEnabled();
}
}
/**
* Rescans the files in the current directory
*/
}
}
// *****************************************
// ***** default AcceptAll file filter *****
// *****************************************
public AcceptAllFileFilter() {
}
return true;
}
}
}
// Penultimate superclass is JLabel
boolean fIsSelected = false;
super();
setFont(f);
setIconTextGap(10);
}
public Component getTableCellRendererComponent(final JTable list, final Object value, final boolean isSelected, final boolean cellHasFocus, final int index, final int col) {
super.getTableCellRendererComponent(list, value, isSelected, false, index, col); // No focus border, thanks
return this;
}
public boolean isSelected() {
return fIsSelected && isEnabled();
}
protected String layoutCL(final JLabel label, final FontMetrics fontMetrics, final String text, final Icon icon, final Rectangle viewR, final Rectangle iconR, final Rectangle textR) {
return SwingUtilities.layoutCompoundLabel(label, fontMetrics, text, icon, label.getVerticalAlignment(), label.getHorizontalAlignment(), label.getVerticalTextPosition(), label.getHorizontalTextPosition(), viewR, iconR, textR, label.getIconTextGap());
}
}
// from ComponentUI update
g.setColor(getBackground());
// from BasicLabelUI paint
Rectangle paintViewR = new Rectangle(paintViewInsets.left, paintViewInsets.top, getWidth() - (paintViewInsets.left + paintViewInsets.right), getHeight() - (paintViewInsets.top + paintViewInsets.bottom));
}
final int textX = paintTextR.x;
if (isEnabled()) {
// Color background = fIsSelected ? getForeground() : getBackground();
g.setColor(background);
g.setColor(getForeground());
} else {
g.setColor(background);
}
}
}
}
super(f);
}
public Component getTableCellRendererComponent(final JTable list, final Object value, final boolean isSelected, final boolean cellHasFocus, final int index, final int col) {
super.getTableCellRendererComponent(list, value, isSelected, false, index, col); // No focus border, thanks
return this;
}
}
super(f);
}
public Component getTableCellRendererComponent(final JTable list, final Object value, final boolean isSelected, final boolean cellHasFocus, final int index, final int col) {
} else {
setText("");
}
return this;
}
}
return PREF_SIZE;
}
return MIN_SIZE;
}
}
return new AquaComboBoxRendererInternal(directoryComboBox) {
public Component getListCellRendererComponent(final JList list, final Object value, final int index, final boolean isSelected, final boolean cellHasFocus) {
setText("");
return this;
}
return this;
}
};
}
//
// DataModel for DirectoryComboxbox
//
return new DirectoryComboBoxModel();
}
/**
* Data model for a type-face selection combo-box.
*/
public DirectoryComboBoxModel() {
super();
// Add the current directory to the model, and make it the
// selectedDirectory
}
/**
* Removes the selected directory, and clears out the
* path file entries leading up to that directory.
*/
private void removeSelectedDirectory() {
fPathCount = 0;
// dump();
}
/**
* Adds the directory to the model and sets it to be selected,
* additionally clears out the previous selected directory and
* the paths leading up to it, if any.
*/
if (fSelectedDirectory != null) {
}
// create File instances of each directory leading up to the top
path.addElement(f);
};
// Add root file (the desktop) to the model
}
// insert all the path fDirectories leading up to the
// selected directory in reverse order (current directory at top)
}
// dump();
}
}
return fSelectedDirectory;
}
public int getSize() {
return fDirectories.size();
}
}
}
//
// Renderer for Types ComboBox
//
return new AquaComboBoxRendererInternal(filterComboBox) {
public Component getListCellRendererComponent(final JList list, final Object value, final int index, final boolean isSelected, final boolean cellHasFocus) {
return this;
}
};
}
//
// DataModel for Types Comboxbox
//
return new FilterComboBoxModel();
}
/**
* Data model for a type-face selection combo-box.
*/
protected class FilterComboBoxModel extends DefaultListModel implements ComboBoxModel, PropertyChangeListener {
protected FilterComboBoxModel() {
super();
}
}
this.clear();
}
boolean found = false;
if (currentFilter != null) {
if (element == currentFilter) {
found = true;
}
}
if (found == false) {
}
}
setSelectedItem(e.getNewValue());
}
}
}
}
if (this.size() > 0) {
}
return returnValue;
}
}
/**
* Acts when FilterComboBox has changed the selected item.
*/
protected FilterComboBoxAction() {
super("FilterComboBoxAction");
}
}
}
/**
* Acts when DirectoryComboBox has changed the selected item.
*/
protected DirectoryComboBoxAction() {
super("DirectoryComboBoxAction");
}
}
}
// Sorting Table operations
super(cm);
setReorderingAllowed(true); // This causes mousePress to call setDraggedColumn
}
// One sort state for each column. Both are ascending by default
final boolean fSortAscending[] = {true, true};
// Instead of dragging, it selects which one to sort by
if (colIndex != fSortColumn) {
} else {
filechooser.firePropertyChange(AquaFileSystemModel.SORT_ASCENDING_CHANGED, !fSortAscending[colIndex], fSortAscending[colIndex]);
}
// Need to repaint the highlighted column.
repaint();
}
}
// This stops mouseDrags from moving the column
return null;
}
return label;
}
public Component getTableCellRendererComponent(final JTable localTable, final Object value, final boolean isSelected, final boolean hasFocus, final int row, final int column) {
if (localTable != null) {
}
}
// Modify the table "border" to draw smaller, and with the titles in the right position
if (column == fSortColumn) {
cellBorder.setSortOrder(fSortAscending[column] ? AquaTableHeaderBorder.SORT_ASCENDING : AquaTableHeaderBorder.SORT_DECENDING);
} else {
}
return this;
}
}
}
// set to a Y BoxLayout. The chooser will be laid out top to bottom.
// construct the top panel
// Add the textfield pane
fTextfieldPanel = new JPanel();
// setBottomPanelForMode will make this visible if we need it
fTextfieldPanel.setVisible(false);
// text field
filenameTextField = new JTextField();
if (f != null) {
}
// separator line
public Dimension getPreferredSize() {
}
};
// DirectoryComboBox, left-justified, 200x20 not including drop shadow
directoryComboBox = new JComboBox();
// ************************************** //
// ************************************** //
// Accessory pane (equiv to Preview pane in NavServices)
}
// Directory list(table), right-justified, resizable
// ********************************** //
// **** Construct the bottom panel ** //
// ********************************** //
fBottomPanel = new JPanel();
// Filter label and combobox.
// I know it's unMaclike, but the filter goes on Directory_only too.
// Combobox
filterComboBox.setOpaque(false);
// fDirectoryPanel: New, Open, Cancel, Approve buttons, right-justified, 82x22
// (sometimes the NewFolder and OpenFolder buttons are invisible)
fDirectoryPanel = new JPanel();
// The ApproveSelection button
fApproveButton = new JButton();
if (fc.getControlButtonsAreShown()) {
}
// don't create til after the FCSubpanel and buttons are made
}
}
}
// Macs start with their focus in text areas if they have them,
// lists otherwise (the other plafs start with the focus on approveButton)
if (focusComponent != null) {
}
}
}
}
// Lazy-init the subpanels
return fSaveFilePanel;
}
return fOpenFilePanel;
}
return fOpenDirOrAnyPanel;
}
return fCustomFilePanel;
}
return fCustomDirOrAnyPanel;
}
else fSubPanel = getOpenDirOrAnyPanel();
else fSubPanel = getCustomDirOrAnyPanel();
}
fc.invalidate();
}
// fTextfieldPanel and fDirectoryPanel both have NewFolder buttons; only one should be visible at a time
return b;
}
b.setMnemonic(mnemonic);
return b;
}
return fButtonActions[which];
}
public void uninstallComponents(final JFileChooser fc) { //$ Metal (on which this is based) doesn't uninstall its components.
}
// Consistent with the AppKit NSSavePanel, clicks on a file (not a directory) should populate the text field
// with that file's display name.
// The autoscroller can generate drag events outside the Table's range.
// rdar://problem/3734130 -- don't populate the text field if this file isn't selectable in this mode.
// [3188387] Populate the file name field with the selected file name
// [3484163] It should also use the display name, not the actual name.
}
}
}
// The first part is similar to MetalFileChooserUI.createList - same kind of listeners
fFileList = new JTableExtension();
if (getFileChooser().isMultiSelectionEnabled()) {
} else {
}
// Now we're different, because we're a table, not a list
fFileList.setShowVerticalLines(false);
fFileList.setShowHorizontalLines(false);
//fc.setFont(f);
//fFileList.setFont(f);
// Row height isn't based on the renderers. It defaults to 16 so we have to set it
// Add a binding for the file list that triggers return and escape
fFileList.registerKeyboardAction(new CancelSelectionAction(), KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_FOCUSED);
// Add a binding for the file list that triggers the default button (see DefaultButtonAction)
fFileList.registerKeyboardAction(new DefaultButtonAction(), KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), JComponent.WHEN_FOCUSED);
final JScrollPane scrollpane = new JScrollPane(fFileList, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
return p;
}
}
}
// ToolTip text varies with type of dialog
protected static final int sGlobalPackageIsTraversable;
protected static final int sGlobalApplicationIsTraversable;
protected static final String APPLICATION_TRAVERSABLE_PROPERTY = "JFileChooser.appBundleIsTraversable";
"never", // Bundle is never traversable
"conditional"}; // Bundle is traversable on command click
AbstractAction[] fButtonActions = {fApproveSelectionAction, fApproveSelectionAction, new CancelSelectionAction(), new OpenSelectionAction(), null, new NewFolderAction()};
if (s == null) return -1;
if (s.equals(sTraversableProperties[i])) return i;
}
return -1;
}
static {
if (o != null && o instanceof String) sGlobalPackageIsTraversable = parseTraversableProperty((String)o);
if (o != null && o instanceof String) sGlobalApplicationIsTraversable = parseTraversableProperty((String)o);
}
static final String[] sButtonKinds = {"openButton", "saveButton", "cancelButton", "openDirectoryButton", "helpButton", "newFolderButton"};
/*-------
Possible states: Save, {Open, Custom}x{Files, File and Directory, Directory}
--------- */
// This class returns the values for the Custom type, to avoid duplicating code in the two Custom subclasses
abstract class FCSubpanel {
// Install the appropriate panels for this mode
// Can this item be selected?
// if not, it's disabled in the list
if (f == null) return false;
}
}
return fApproveButton;
}
// Default to the textfield, panels without one should subclass
return filenameTextField;
}
// Fallback to "choose"
}
// Try to get the custom text. If none, use the fallback
if (buttonText != null) {
buttonText.trim();
}
return fallbackText;
}
// Don't use a default
return fc.getApproveButtonMnemonic();
}
// No fallback
}
if (tooltipText != null) {
tooltipText.trim();
}
return fallbackText;
}
return cancelChooseButtonToolTipText;
}
}
// Custom FILES_ONLY dialog
/*
NavServices Save appearance with Open behavior
Approve button label = Open when list has focus and a directory is selected, Custom otherwise
No OpenDirectory button - Approve button is overloaded
Default button / double click = Approve
Has text field
List - everything is enabled
*/
fOpenButton.setVisible(false);
fNewFolderButton.setVisible(true);
}
// If the list has focus, the mode depends on the selection
// - directory = open, file = approve
// If something else has focus and we have text, it's approve
// otherwise, it depends on selection again.
else if (textfieldIsValid()) return false;
return selectionIsDirectory;
}
// The approve button is overloaded to mean OpenDirectory or Save
File f = getFirstSelectedItem();
if (inOpenDirectoryMode(fc, f)) {
openDirectory(f);
} else {
if (f != null) {
selectionInProgress = true;
selectionInProgress = false;
}
}
}
// The approve button should be enabled
// - if something in the list can be opened
// - if the textfield has something in it
boolean enabled = true;
if (!inOpenDirectoryMode(fc, f)) {
}
// The OpenDirectory button should be disabled if there's no directory selected
// Update the default button, since we may have disabled the current default.
}
// everything's enabled, because we don't know what they're doing with them
if (f == null) return false;
}
// The approve Button should have openDirectoryButtonToolTipText when the selection is a folder...
return super.getApproveButtonToolTipText(fc);
}
}
// All Save dialogs
/*
NavServices Save
Approve button label = Open when list has focus and a directory is selected, Save otherwise
No OpenDirectory button - Approve button is overloaded
Default button / double click = Approve
Has text field
Has NewFolder button (by text field)
List - only traversables are enabled
List is always SINGLE_SELECT
*/
// Subclasses CustomFilePanel because they look alike and have some common behavior
fTextfieldPanel.setVisible(true);
fOpenButton.setVisible(false);
fNewFolderButton.setVisible(true);
}
// only traversables are enabled, regardless of mode
// because all you can do is select the next folder to open
}
// The approve button means 'approve the file name in the text field.'
if (f != null) {
selectionInProgress = true;
selectionInProgress = false;
}
}
// The approve button should be enabled if the textfield has something in it
final boolean enabled = textfieldIsValid();
}
// Get the custom text, or fallback to "Save"
}
return saveButtonMnemonic;
}
// The approve Button should have openDirectoryButtonToolTipText when the selection is a folder...
}
return cancelSaveButtonToolTipText;
}
}
// Open FILES_ONLY
/*
NSOpenPanel-style
Approve button label = Open
Default button / double click = Approve
No text field
No NewFolder button
List - all items are enabled
*/
fTextfieldPanel.setVisible(false);
fOpenButton.setVisible(false);
fNewFolderButton.setVisible(false);
}
}
// Default to the list
return fFileList;
}
// Button is disabled if there's nothing selected
}
// all items are enabled
}
// Get the custom text, or fallback to "Open"
}
return openButtonMnemonic;
}
}
return cancelOpenButtonToolTipText;
}
}
// used by open and custom panels for Directory only or files and directories
fOpenButton.setVisible(false);
}
return getApproveButton(fc);
}
// Button is disabled if there's nothing selected
// Approve button is handled by the subclasses
// getApproveButton(fc).setEnabled(f != null);
// The OpenDirectory button should be disabled if there's no directory selected
// - we only check the first item
fOpenButton.setEnabled(false);
}
}
// Open FILES_AND_DIRECTORIES or DIRECTORIES_ONLY
/*
NavServices Choose
Has OpenDirectory button
Default button / double click = OpenDirectory
No text field
List - files are disabled in DIRECTORIES_ONLY
*/
fTextfieldPanel.setVisible(false);
fNewFolderButton.setVisible(false);
}
// Default to the list
return fFileList;
}
return chooseButtonMnemonic;
}
if (fc.getFileSelectionMode() == JFileChooser.DIRECTORIES_ONLY) fallbackText = chooseFolderButtonToolTipText;
}
// Button is disabled if there's nothing selected
super.updateButtonState(fc, f);
}
}
// Custom FILES_AND_DIRECTORIES or DIRECTORIES_ONLY
/*
No NavServices equivalent
Approve button label = user defined or Choose
Has OpenDirectory button
Default button / double click = OpenDirectory
Has text field
Has NewFolder button (by text field)
List - files are disabled in DIRECTORIES_ONLY
*/
fTextfieldPanel.setVisible(true);
fNewFolderButton.setVisible(true);
}
// If there's text, make a file and select it
if (f != null) {
selectionInProgress = true;
selectionInProgress = false;
}
}
// Button is disabled if there's nothing selected
super.updateButtonState(fc, f);
}
}
// See FileRenderer - documents in Save dialogs draw disabled, so they shouldn't be selected
}
// Can the file be selected in this mode?
// (files are visible even if they can't be selected)
}
// Make sure everything in the selection interval is valid
}
int end;
do {
// Find the first selectable file in the range
if (isSelectableInListIndex(start)) break;
}
end = -1;
// Find the last selectable file in the range
if (!isSelectableInListIndex(i)) {
break;
}
end = i;
}
// Select the range
if (end >= 0) {
// If setting the selection, do "set" the first time to clear the old one
// after that do "add" to extend it
if (isSetSelection) {
isSetSelection = false;
} else {
}
} else {
break;
}
}
}
}
} else {
}
}
return;
}
if (getSelectionMode() != MULTIPLE_INTERVAL_SELECTION) {
return;
}
}
}
// Convenience, to translate from the JList directory view to the Mac-style JTable
// & minimize diffs between this and BasicFileChooserUI
}
}
if (cellBounds != null) {
}
}
return rowAtPoint(location);
}
}
}