Skip to content
Permalink
Browse files
8049700: Deprecate obsolete classes and methods in javax/swing/plaf/b…
…asic

Reviewed-by: psadhukhan, prr, serb, azvegint, iris
  • Loading branch information
trebari committed May 7, 2021
1 parent 3a474d9 commit ebb68d2b8652328b80780f6a39c78ff19f24136a
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2021, 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
@@ -224,16 +224,20 @@ public Object getElementAt(int index) {
}

/**
* Obsolete - not used.
* Obsolete - not used. This method is a no-op.
* @param e list data event
* @deprecated Obsolete method, not used anymore.
*/
@Deprecated(since = "17")
public void intervalAdded(ListDataEvent e) {
}

/**
* Obsolete - not used.
* Obsolete - not used. This method is a no-op.
* @param e list data event
* @deprecated Obsolete method, not used anymore.
*/
@Deprecated(since = "17")
public void intervalRemoved(ListDataEvent e) {
}

@@ -251,7 +255,9 @@ protected void sort(Vector<? extends File> v){
* @return a comparison of the file names
* @param a a file
* @param b another file
* @deprecated Obsolete method, not used anymore.
*/
@Deprecated(since = "17")
protected boolean lt(File a, File b) {
// First ignore case when comparing
int diff = a.getName().toLowerCase().compareTo(b.getName().toLowerCase());
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2021, 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
@@ -921,7 +921,13 @@ else if (me == null)
if (dumpStack == true)
Thread.dumpStack();
}
/** Mouse input handler */
/**
* Mouse input handler.
* This class exists only for backward compatibility.
* All its functionality has been moved into Handler.
* @deprecated
*/
@Deprecated(since = "17")
protected class MouseInputHandler implements MouseInputListener {
// NOTE: This class exists only for backward compatibility. All
// its functionality has been moved into Handler. If you need to add
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2021, 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
@@ -496,7 +496,11 @@ public int getBaseline(JComponent c, int width, int height) {

/**
* Listener for viewport events.
* This class exists only for backward compatibility.
* All its functionality has been moved into Handler.
* @deprecated
*/
@Deprecated(since = "17")
public class ViewportChangeHandler implements ChangeListener
{
/**
@@ -526,7 +530,11 @@ protected ChangeListener createViewportChangeListener() {

/**
* Horizontal scrollbar listener.
* This class exists only for backward compatibility.
* All its functionality has been moved into Handler.
* @deprecated
*/
@Deprecated(since = "17")
public class HSBChangeListener implements ChangeListener
{
/**
@@ -565,7 +573,11 @@ protected ChangeListener createHSBChangeListener() {

/**
* Vertical scrollbar listener.
* This class exists only for backward compatibility.
* All its functionality has been moved into Handler.
* @deprecated
*/
@Deprecated(since = "17")
public class VSBChangeListener implements ChangeListener
{
/**
@@ -770,7 +782,11 @@ private void updateScrollBar(PropertyChangeEvent pce, ChangeListener cl,

/**
* Property change handler.
* This class exists only for backward compatibility.
* All its functionality has been moved into Handler.
* @deprecated
*/
@Deprecated(since = "17")
public class PropertyChangeHandler implements PropertyChangeListener
{
/**
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2021, 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
@@ -548,7 +548,10 @@ private Border createNonRolloverToggleBorder() {
* @param toolbar an instance of {@code JToolBar}
* @return an instance of {@code JFrame}
* @see #createFloatingWindow
* @deprecated It is recommended that {@link BasicToolBarUI#createFloatingWindow(JToolBar)}
* be used instead
*/
@Deprecated(since = "17")
protected JFrame createFloatingFrame(JToolBar toolbar) {
Window window = SwingUtilities.getWindowAncestor(toolbar);
@SuppressWarnings("serial") // anonymous class

0 comments on commit ebb68d2

Please sign in to comment.