8033221: Fix serial lint warnings in sun.swing.*
Reviewed-by: alexsch
This commit is contained in:
parent
08fbbf811b
commit
01e48af83f
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 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
|
||||
@ -34,6 +34,7 @@ import java.beans.PropertyChangeListener;
|
||||
/**
|
||||
* Data model for a type-face selection combo-box.
|
||||
*/
|
||||
@SuppressWarnings("serial") // JDK-implementation class
|
||||
public abstract class AbstractFilterComboBoxModel
|
||||
extends AbstractListModel<FileFilter>
|
||||
implements ComboBoxModel<FileFilter>, PropertyChangeListener {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 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
|
||||
@ -43,6 +43,7 @@ import java.util.*;
|
||||
*
|
||||
* @author Scott Violet
|
||||
*/
|
||||
@SuppressWarnings("serial") // JDK-implementation class
|
||||
public class BakedArrayList extends ArrayList {
|
||||
/**
|
||||
* The cached hashCode.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 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
|
||||
@ -58,6 +58,7 @@ import sun.awt.shell.*;
|
||||
*
|
||||
* @author Leif Samuelsson
|
||||
*/
|
||||
@SuppressWarnings("serial") // JDK-implementation class
|
||||
public class FilePane extends JPanel implements PropertyChangeListener {
|
||||
// Constants for actions. These are used for the actions' ACTION_COMMAND_KEY
|
||||
// and as keys in the action maps for FilePane and the corresponding UI classes
|
||||
@ -391,6 +392,7 @@ public class FilePane extends JPanel implements PropertyChangeListener {
|
||||
firePropertyChange("viewType", oldValue, viewType);
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial") // JDK-implementation class
|
||||
class ViewTypeAction extends AbstractAction {
|
||||
private int viewType;
|
||||
|
||||
@ -470,6 +472,7 @@ public class FilePane extends JPanel implements PropertyChangeListener {
|
||||
*/
|
||||
public Action[] getActions() {
|
||||
if (actions == null) {
|
||||
@SuppressWarnings("serial") // JDK-implementation class
|
||||
class FilePaneAction extends AbstractAction {
|
||||
FilePaneAction(String name) {
|
||||
this(name, name);
|
||||
@ -577,6 +580,8 @@ public class FilePane extends JPanel implements PropertyChangeListener {
|
||||
public JPanel createList() {
|
||||
JPanel p = new JPanel(new BorderLayout());
|
||||
final JFileChooser fileChooser = getFileChooser();
|
||||
|
||||
@SuppressWarnings("serial") // anonymous class
|
||||
final JList<Object> list = new JList<Object>() {
|
||||
public int getNextMatch(String prefix, int startIndex, Position.Bias bias) {
|
||||
ListModel model = getModel();
|
||||
@ -651,6 +656,7 @@ public class FilePane extends JPanel implements PropertyChangeListener {
|
||||
/**
|
||||
* This model allows for sorting JList
|
||||
*/
|
||||
@SuppressWarnings("serial") // JDK-implementation class
|
||||
private class SortableListModel extends AbstractListModel<Object>
|
||||
implements TableModelListener, RowSorterListener {
|
||||
|
||||
@ -684,6 +690,7 @@ public class FilePane extends JPanel implements PropertyChangeListener {
|
||||
return detailsTableModel;
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial") // JDK-implementation class
|
||||
class DetailsTableModel extends AbstractTableModel implements ListDataListener {
|
||||
JFileChooser chooser;
|
||||
BasicDirectoryModel directoryModel;
|
||||
@ -1003,6 +1010,7 @@ public class FilePane extends JPanel implements PropertyChangeListener {
|
||||
return tableCellEditor;
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial") // JDK-implementation class
|
||||
private class DetailsTableCellEditor extends DefaultCellEditor {
|
||||
private final JTextField tf;
|
||||
|
||||
@ -1025,7 +1033,7 @@ public class FilePane extends JPanel implements PropertyChangeListener {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("serial") // JDK-implementation class
|
||||
class DetailsTableCellRenderer extends DefaultTableCellRenderer {
|
||||
JFileChooser chooser;
|
||||
DateFormat df;
|
||||
@ -1129,6 +1137,7 @@ public class FilePane extends JPanel implements PropertyChangeListener {
|
||||
|
||||
JPanel p = new JPanel(new BorderLayout());
|
||||
|
||||
@SuppressWarnings("serial") // anonymous class
|
||||
final JTable detailsTable = new JTable(getDetailsTableModel()) {
|
||||
// Handle Escape key events here
|
||||
protected boolean processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed) {
|
||||
@ -1447,6 +1456,7 @@ public class FilePane extends JPanel implements PropertyChangeListener {
|
||||
|
||||
protected Action newFolderAction;
|
||||
|
||||
@SuppressWarnings("serial") // anonymous class inside
|
||||
public Action getNewFolderAction() {
|
||||
if (!readOnly && newFolderAction == null) {
|
||||
newFolderAction = new AbstractAction(newFolderActionLabelText) {
|
||||
@ -1479,6 +1489,7 @@ public class FilePane extends JPanel implements PropertyChangeListener {
|
||||
return newFolderAction;
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial") // JDK-implementation class
|
||||
protected class FileRenderer extends DefaultListCellRenderer {
|
||||
|
||||
public Component getListCellRendererComponent(JList list, Object value,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2004, 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
|
||||
@ -35,6 +35,7 @@ import java.awt.Image;
|
||||
* @author Shannon Hickey
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings("serial") // JDK-implementation class
|
||||
public class ImageIconUIResource extends ImageIcon implements UIResource {
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 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
|
||||
@ -64,6 +64,7 @@ import sun.security.action.GetPropertyAction;
|
||||
* @author Artem Ananiev
|
||||
* @author Anton Tarasov
|
||||
*/
|
||||
@SuppressWarnings("serial") // JDK-implementation class
|
||||
public final class JLightweightFrame extends LightweightFrame implements RootPaneContainer {
|
||||
|
||||
private final JRootPane rootPane = new JRootPane();
|
||||
@ -209,6 +210,7 @@ public final class JLightweightFrame extends LightweightFrame implements RootPan
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial") // anonymous class inside
|
||||
private void initInterior() {
|
||||
contentPane = new JPanel() {
|
||||
@Override
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004, 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2004, 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
|
||||
@ -36,6 +36,7 @@ import javax.swing.plaf.ColorUIResource;
|
||||
* @author Shannon Hickey
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings("serial") // JDK-implementation class
|
||||
public class PrintColorUIResource extends ColorUIResource {
|
||||
|
||||
/** The color to use during printing */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 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
|
||||
@ -62,6 +62,7 @@ public class PrintingStatus {
|
||||
private final AtomicBoolean isAborted = new AtomicBoolean(false);
|
||||
|
||||
// the action that will abort printing
|
||||
@SuppressWarnings("serial") // anonymous class
|
||||
private final Action abortAction = new AbstractAction() {
|
||||
public void actionPerformed(ActionEvent ae) {
|
||||
if (!isAborted.get()) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 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
|
||||
@ -47,6 +47,7 @@ import sun.awt.OSInfo;
|
||||
*
|
||||
* @author Leif Samuelsson
|
||||
*/
|
||||
@SuppressWarnings("serial") // JDK-implementation class
|
||||
public class WindowsPlacesBar extends JToolBar
|
||||
implements ActionListener, PropertyChangeListener {
|
||||
JFileChooser fc;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 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
|
||||
@ -36,6 +36,7 @@ import javax.swing.plaf.UIResource;
|
||||
* Sorting icon.
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings("serial") // JDK-implementation class
|
||||
public class SortArrowIcon implements Icon, UIResource, Serializable {
|
||||
// Height of the arrow, the width is ARROW_HEIGHT
|
||||
private static final int ARROW_HEIGHT = 5;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 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
|
||||
@ -303,6 +303,7 @@ public abstract class SynthFileChooserUI extends BasicFileChooserUI implements
|
||||
/**
|
||||
* Responds to a File Name completion request (e.g. Tab)
|
||||
*/
|
||||
@SuppressWarnings("serial") // JDK-implementation class
|
||||
private class FileNameCompletionAction extends AbstractAction {
|
||||
protected FileNameCompletionAction() {
|
||||
super("fileNameCompletion");
|
||||
@ -538,6 +539,7 @@ public abstract class SynthFileChooserUI extends BasicFileChooserUI implements
|
||||
public void clearIconCache() { }
|
||||
|
||||
// Copied as SynthBorder is package private in synth
|
||||
@SuppressWarnings("serial") // JDK-implementation clas
|
||||
private class UIBorder extends AbstractBorder implements UIResource {
|
||||
private Insets _insets;
|
||||
UIBorder(Insets insets) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 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
|
||||
@ -190,6 +190,7 @@ public class SynthFileChooserUIImpl extends SynthFileChooserUI {
|
||||
readOnly = UIManager.getBoolean("FileChooser.readOnly");
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial") // anonymous classes inside
|
||||
public void installComponents(JFileChooser fc) {
|
||||
super.installComponents(fc);
|
||||
|
||||
@ -734,6 +735,7 @@ public class SynthFileChooserUIImpl extends SynthFileChooserUI {
|
||||
/**
|
||||
* Data model for a type-face selection combo-box.
|
||||
*/
|
||||
@SuppressWarnings("serial") // JDK-implementation class
|
||||
protected class DirectoryComboBoxModel extends AbstractListModel<File> implements ComboBoxModel<File> {
|
||||
Vector<File> directories = new Vector<File>();
|
||||
int[] depths = null;
|
||||
@ -863,6 +865,7 @@ public class SynthFileChooserUIImpl extends SynthFileChooserUI {
|
||||
/**
|
||||
* Acts when DirectoryComboBox has changed the selected item.
|
||||
*/
|
||||
@SuppressWarnings("serial") // JDK-implementation class
|
||||
protected class DirectoryComboBoxAction extends AbstractAction {
|
||||
protected DirectoryComboBoxAction() {
|
||||
super("DirectoryComboBoxAction");
|
||||
@ -923,6 +926,7 @@ public class SynthFileChooserUIImpl extends SynthFileChooserUI {
|
||||
/**
|
||||
* Data model for a type-face selection combo-box.
|
||||
*/
|
||||
@SuppressWarnings("serial") // JDK-implementation class
|
||||
protected class FilterComboBoxModel extends AbstractFilterComboBoxModel {
|
||||
protected JFileChooser getFileChooser() {
|
||||
return SynthFileChooserUIImpl.this.getFileChooser();
|
||||
@ -1012,6 +1016,7 @@ public class SynthFileChooserUIImpl extends SynthFileChooserUI {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial") // JDK-implementation class
|
||||
private class AlignedLabel extends JLabel {
|
||||
private AlignedLabel[] group;
|
||||
private int maxWidth = 0;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 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
|
||||
@ -36,6 +36,7 @@ import javax.swing.plaf.UIResource;
|
||||
* Classic sort icons.
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings("serial") // JDK-implementation class
|
||||
public class ClassicSortArrowIcon implements Icon, UIResource, Serializable{
|
||||
private static final int X_OFFSET = 9;
|
||||
private boolean ascending;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 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
|
||||
@ -39,6 +39,7 @@ import javax.swing.plaf.UIResource;
|
||||
import javax.swing.border.Border;
|
||||
import javax.swing.table.*;
|
||||
|
||||
@SuppressWarnings("serial") // JDK-implementation class
|
||||
public class DefaultTableCellHeaderRenderer extends DefaultTableCellRenderer
|
||||
implements UIResource {
|
||||
private boolean horizontalTextPositionSet;
|
||||
@ -187,6 +188,7 @@ public class DefaultTableCellHeaderRenderer extends DefaultTableCellRenderer
|
||||
return new Point(x, y);
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial") // JDK-implementation class
|
||||
private class EmptyIcon implements Icon, Serializable {
|
||||
int width = 0;
|
||||
int height = 0;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 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
|
||||
@ -324,6 +324,7 @@ public class TextComponentPrintable implements CountingPrintable {
|
||||
}
|
||||
}
|
||||
}
|
||||
@SuppressWarnings("serial") // anonymous class inside
|
||||
private JTextComponent createPrintShellOnEDT(final JTextComponent textComponent) {
|
||||
assert SwingUtilities.isEventDispatchThread();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user