--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java Fri Mar 21 11:33:52 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java Sun Mar 23 13:49:48 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -234,7 +234,8 @@
topPanel.add(lookInLabel, BorderLayout.BEFORE_LINE_BEGINS);
// CurrentDir ComboBox
- directoryComboBox = new JComboBox() {
+ @SuppressWarnings("serial") // anonymous class
+ JComboBox tmp1 = new JComboBox() {
public Dimension getPreferredSize() {
Dimension d = super.getPreferredSize();
// Must be small enough to not affect total width.
@@ -242,6 +243,7 @@
return d;
}
};
+ directoryComboBox = tmp1;
directoryComboBox.putClientProperty(AccessibleContext.ACCESSIBLE_DESCRIPTION_PROPERTY,
lookInLabelText);
directoryComboBox.putClientProperty( "JComboBox.isTableCellEditor", Boolean.TRUE );
@@ -380,11 +382,13 @@
populateFileNameLabel();
fileNamePanel.add(fileNameLabel);
- fileNameTextField = new JTextField(35) {
+ @SuppressWarnings("serial") // anonymous class
+ JTextField tmp2 = new JTextField(35) {
public Dimension getMaximumSize() {
return new Dimension(Short.MAX_VALUE, super.getPreferredSize().height);
}
};
+ fileNameTextField = tmp2;
fileNamePanel.add(fileNameTextField);
fileNameLabel.setLabelFor(fileNameTextField);
fileNameTextField.addFocusListener(
@@ -534,6 +538,7 @@
}
// Obsolete class, not used in this version.
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
protected class FileRenderer extends DefaultListCellRenderer {
}
@@ -853,6 +858,7 @@
//
// Renderer for DirectoryComboBox
//
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
class DirectoryComboBoxRenderer extends DefaultListCellRenderer {
IndentIcon ii = new IndentIcon();
public Component getListCellRendererComponent(JList list, Object value,
@@ -910,6 +916,7 @@
/**
* Data model for a type-face selection combo-box.
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
protected class DirectoryComboBoxModel extends AbstractListModel<Object> implements ComboBoxModel<Object> {
Vector<File> directories = new Vector<File>();
int[] depths = null;
@@ -1042,6 +1049,7 @@
/**
* Render different type sizes and styles.
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
public class FilterComboBoxRenderer extends DefaultListCellRenderer {
public Component getListCellRendererComponent(JList list,
Object value, int index, boolean isSelected,
@@ -1067,6 +1075,7 @@
/**
* Data model for a type-face selection combo-box.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
protected class FilterComboBoxModel extends AbstractListModel<Object> implements ComboBoxModel<Object>, PropertyChangeListener {
protected FileFilter[] filters;
protected FilterComboBoxModel() {
@@ -1144,6 +1153,7 @@
/**
* Acts when DirectoryComboBox has changed the selected item.
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
protected class DirectoryComboBoxAction extends AbstractAction {
protected DirectoryComboBoxAction() {
super("DirectoryComboBoxAction");
@@ -1244,6 +1254,7 @@
}
}
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
private class AlignedLabel extends JLabel {
private AlignedLabel[] group;
private int maxWidth = 0;