Skip to content

Commit 42cef27

Browse files
committedJan 26, 2021
8260343: Delete obsolete classes in the Windows L&F
Reviewed-by: aivanov, pbansal
1 parent 9f0a043 commit 42cef27

File tree

3 files changed

+65
-103
lines changed

3 files changed

+65
-103
lines changed
 

‎src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsButtonListener.java

-44
This file was deleted.

‎src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsComboBoxUI.java

+1-29
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -517,34 +517,6 @@ WindowsComboBoxUI getWindowsComboBoxUI() {
517517
}
518518
}
519519

520-
521-
/**
522-
* Subclassed to add Windows specific Key Bindings.
523-
* This class is now obsolete and doesn't do anything.
524-
* Only included for backwards API compatibility.
525-
* Do not call or override.
526-
*
527-
* @deprecated As of Java 2 platform v1.4.
528-
*/
529-
@Deprecated
530-
@SuppressWarnings("serial") // Superclass is not serializable across versions
531-
protected class WindowsComboPopup extends BasicComboPopup {
532-
533-
public WindowsComboPopup( JComboBox<Object> cBox ) {
534-
super( cBox );
535-
}
536-
537-
protected KeyListener createKeyListener() {
538-
return new InvocationKeyHandler();
539-
}
540-
541-
protected class InvocationKeyHandler extends BasicComboPopup.InvocationKeyHandler {
542-
protected InvocationKeyHandler() {
543-
WindowsComboPopup.this.super();
544-
}
545-
}
546-
}
547-
548520
@SuppressWarnings("serial") // Same-version serialization only
549521
protected class WinComboPopUp extends BasicComboPopup {
550522
private Skin listBoxBorder = null;

‎src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java

+64-30
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -25,27 +25,75 @@
2525

2626
package com.sun.java.swing.plaf.windows;
2727

28-
import javax.swing.*;
29-
import javax.swing.border.*;
30-
import javax.swing.filechooser.*;
31-
import javax.swing.event.*;
32-
import javax.swing.plaf.*;
33-
import javax.swing.plaf.basic.*;
34-
import java.awt.*;
35-
import java.awt.event.*;
28+
import java.awt.BorderLayout;
29+
import java.awt.Color;
30+
import java.awt.Component;
31+
import java.awt.ComponentOrientation;
32+
import java.awt.Dimension;
33+
import java.awt.Graphics;
34+
import java.awt.Insets;
35+
import java.awt.event.ActionEvent;
36+
import java.awt.event.ActionListener;
37+
import java.awt.event.FocusAdapter;
38+
import java.awt.event.FocusEvent;
39+
import java.awt.event.KeyAdapter;
40+
import java.awt.event.KeyEvent;
41+
import java.awt.event.MouseAdapter;
42+
import java.awt.event.MouseEvent;
43+
import java.awt.event.MouseListener;
3644
import java.awt.image.BufferedImage;
37-
import java.beans.*;
45+
import java.beans.PropertyChangeEvent;
46+
import java.beans.PropertyChangeListener;
3847
import java.io.File;
3948
import java.io.FileNotFoundException;
4049
import java.io.IOException;
41-
import java.util.*;
42-
import java.security.AccessController;
43-
import java.security.PrivilegedAction;
50+
import java.util.Arrays;
51+
import java.util.Locale;
52+
import java.util.Vector;
53+
54+
import javax.accessibility.AccessibleContext;
55+
import javax.swing.AbstractListModel;
56+
import javax.swing.Action;
57+
import javax.swing.ActionMap;
58+
import javax.swing.Box;
59+
import javax.swing.BoxLayout;
60+
import javax.swing.ButtonGroup;
61+
import javax.swing.ComboBoxModel;
62+
import javax.swing.DefaultButtonModel;
63+
import javax.swing.DefaultListCellRenderer;
64+
import javax.swing.Icon;
65+
import javax.swing.ImageIcon;
66+
import javax.swing.JButton;
67+
import javax.swing.JComboBox;
68+
import javax.swing.JComponent;
69+
import javax.swing.JFileChooser;
70+
import javax.swing.JLabel;
71+
import javax.swing.JList;
72+
import javax.swing.JPanel;
73+
import javax.swing.JPopupMenu;
74+
import javax.swing.JRadioButtonMenuItem;
75+
import javax.swing.JTextField;
76+
import javax.swing.JToolBar;
77+
import javax.swing.SwingUtilities;
78+
import javax.swing.UIManager;
79+
import javax.swing.border.EmptyBorder;
80+
import javax.swing.event.ListSelectionEvent;
81+
import javax.swing.event.ListSelectionListener;
82+
import javax.swing.event.PopupMenuEvent;
83+
import javax.swing.event.PopupMenuListener;
84+
import javax.swing.filechooser.FileFilter;
85+
import javax.swing.filechooser.FileSystemView;
86+
import javax.swing.filechooser.FileView;
87+
import javax.swing.plaf.ActionMapUIResource;
88+
import javax.swing.plaf.ComponentUI;
89+
import javax.swing.plaf.InsetsUIResource;
90+
import javax.swing.plaf.basic.BasicDirectoryModel;
91+
import javax.swing.plaf.basic.BasicFileChooserUI;
4492

4593
import sun.awt.shell.ShellFolder;
46-
import sun.swing.*;
47-
48-
import javax.accessibility.*;
94+
import sun.swing.FilePane;
95+
import sun.swing.SwingUtilities2;
96+
import sun.swing.WindowsPlacesBar;
4997

5098
/**
5199
* Windows {@literal L&F} implementation of a FileChooser.
@@ -597,20 +645,6 @@ public ListSelectionListener createListSelectionListener(JFileChooser fc) {
597645
return super.createListSelectionListener(fc);
598646
}
599647

600-
// Obsolete class, not used in this version.
601-
@SuppressWarnings("serial")
602-
protected class WindowsNewFolderAction extends NewFolderAction {
603-
}
604-
605-
// Obsolete class, not used in this version.
606-
protected class SingleClickListener extends MouseAdapter {
607-
}
608-
609-
// Obsolete class, not used in this version.
610-
@SuppressWarnings("serial") // Superclass is not serializable across versions
611-
protected class FileRenderer extends DefaultListCellRenderer {
612-
}
613-
614648
public void uninstallUI(JComponent c) {
615649
// Remove listeners
616650
c.removePropertyChangeListener(filterComboBoxModel);

0 commit comments

Comments
 (0)
Please sign in to comment.