<Swing Dev> RFR: 8049700: Deprecate obsolete classes and methods in javax/swing/plaf/basic

classic Classic list List threaded Threaded
26 messages Options
12
Reply | Threaded
Open this post in threaded view
|

<Swing Dev> RFR: 8049700: Deprecate obsolete classes and methods in javax/swing/plaf/basic

Tejpal Rebari-2
Please review the following fix for jdk17.
In this fix i have deprecated and marked for removal following classes and methods
   public void intervalAdded(ListDataEvent e)
   public void intervalRemoved(ListDataEvent e)
   protected boolean lt(File a, File b) in BasicDirectoryModel.java

   inner class PropertyChangeHandler, VSBChangeListener, HSBChangeListener,
   ViewportChangeHandler in BasicScrollPaneUI.java
   inner class MouseInputHandler in BasicMenuItemUI.java
   method BasicToolBarUI.java#createFloatingFrame

From 8049700 not deprecated the paintText(Graphics g, JComponent c, Rectangle textRect, String text) method in BasicButtonUI  as AquaButtonUI, MetalButtonUI and MetalToggleButtonUI overrides it.
Similarly not deprecated ChangeHandler of BasicMenuUI as AquaMenuUI and MotifMenuUI uses this class.

-------------

Commit messages:
 - initial fix

Changes: https://git.openjdk.java.net/jdk/pull/1958/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1958&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8049700
  Stats: 38 lines in 4 files changed: 38 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1958.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1958/head:pull/1958

PR: https://git.openjdk.java.net/jdk/pull/1958
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8049700: Deprecate obsolete classes and methods in javax/swing/plaf/basic

Prasanta Sadhukhan-2
On Wed, 6 Jan 2021 12:43:41 GMT, Tejpal Rebari <[hidden email]> wrote:

> Please review the following fix for jdk17.
> In this fix i have deprecated and marked for removal following classes and methods
>    public void intervalAdded(ListDataEvent e)
>    public void intervalRemoved(ListDataEvent e)
>    protected boolean lt(File a, File b) in BasicDirectoryModel.java
>
>    inner class PropertyChangeHandler, VSBChangeListener, HSBChangeListener,
>    ViewportChangeHandler in BasicScrollPaneUI.java
>    inner class MouseInputHandler in BasicMenuItemUI.java
>    method BasicToolBarUI.java#createFloatingFrame
>
> From 8049700 not deprecated the paintText(Graphics g, JComponent c, Rectangle textRect, String text) method in BasicButtonUI  as AquaButtonUI, MetalButtonUI and MetalToggleButtonUI overrides it.
> Similarly not deprecated ChangeHandler of BasicMenuUI as AquaMenuUI and MotifMenuUI uses this class.

Please elaborate as to why this methods are to be deprecated.
It will be useful if you give alternate methods to be used in the javadoc in @deprecated tag
which are supposed to be called by user once these are removed.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1958
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8049700: Deprecate obsolete classes and methods in javax/swing/plaf/basic

Tejpal Rebari-2
On Wed, 13 Jan 2021 05:52:49 GMT, Prasanta Sadhukhan <[hidden email]> wrote:

>> Please review the following fix for jdk17.
>> In this fix i have deprecated and marked for removal following classes and methods
>>    public void intervalAdded(ListDataEvent e)
>>    public void intervalRemoved(ListDataEvent e)
>>    protected boolean lt(File a, File b) in BasicDirectoryModel.java
>>
>>    inner class PropertyChangeHandler, VSBChangeListener, HSBChangeListener,
>>    ViewportChangeHandler in BasicScrollPaneUI.java
>>    inner class MouseInputHandler in BasicMenuItemUI.java
>>    method BasicToolBarUI.java#createFloatingFrame
>>
>> From 8049700 not deprecated the paintText(Graphics g, JComponent c, Rectangle textRect, String text) method in BasicButtonUI  as AquaButtonUI, MetalButtonUI and MetalToggleButtonUI overrides it.
>> Similarly not deprecated ChangeHandler of BasicMenuUI as AquaMenuUI and MotifMenuUI uses this class.
>
> Please elaborate as to why this methods are to be deprecated.
> It will be useful if you give alternate methods to be used in the javadoc in @deprecated tag
> which are supposed to be called by user once these are removed.

The methods intervalAdded(ListDataEvent e) ,intervalRemoved(ListDataEvent e) and  lt(File a, File b) of  javax/swing/plaf/basic/BasicDirectoryModel.java  states that "Obsolete - not used" ( in the doc).

The BasicDirectoryModel uses similar methods like fireIntervalAdded, fireIntervalRemoved which calls AbstractListModel#fireIntervalAdded.
But not sure that these are the  alternate methods.Also dont see anything similar to lt(File a, File b).

The method createFloatingFrame in the BasicToolBarUI.java states that it is "No longer used" and also specifies to use BasicToolBarUI.createFloatingWindow(JToolBar).

The class MouseInputHandler in BasicMenuUI.java and classes PropertyChangeHandler, VSBChangeListener, HSBChangeListener, ViewportChangeHandler in BasicScrollPaneUI.java states that(as comments inside the class)
        "This class exists only for backward compatibility. All
        its functionality has been moved into Handler."
we can add the above in the doc for these classes.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1958
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8049700: Deprecate obsolete classes and methods in javax/swing/plaf/basic [v2]

Tejpal Rebari-2
In reply to this post by Tejpal Rebari-2
> Please review the following fix for jdk17.
> In this fix i have deprecated and marked for removal following classes and methods
>    public void intervalAdded(ListDataEvent e)
>    public void intervalRemoved(ListDataEvent e)
>    protected boolean lt(File a, File b) in BasicDirectoryModel.java
>
>    inner class PropertyChangeHandler, VSBChangeListener, HSBChangeListener,
>    ViewportChangeHandler in BasicScrollPaneUI.java
>    inner class MouseInputHandler in BasicMenuItemUI.java
>    method BasicToolBarUI.java#createFloatingFrame
>
> From 8049700 not deprecated the paintText(Graphics g, JComponent c, Rectangle textRect, String text) method in BasicButtonUI  as AquaButtonUI, MetalButtonUI and MetalToggleButtonUI overrides it.
> Similarly not deprecated ChangeHandler of BasicMenuUI as AquaMenuUI and MotifMenuUI uses this class.

Tejpal Rebari has updated the pull request incrementally with one additional commit since the last revision:

  minor correction

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/1958/files
  - new: https://git.openjdk.java.net/jdk/pull/1958/files/8504fc7c..9bdb67a3

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1958&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1958&range=00-01

  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1958.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1958/head:pull/1958

PR: https://git.openjdk.java.net/jdk/pull/1958
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8049700: Deprecate obsolete classes and methods in javax/swing/plaf/basic [v2]

Prasanta Sadhukhan-2
In reply to this post by Tejpal Rebari-2
On Tue, 19 Jan 2021 14:31:03 GMT, Tejpal Rebari <[hidden email]> wrote:

>
>
> The methods intervalAdded(ListDataEvent e) ,intervalRemoved(ListDataEvent e) and lt(File a, File b) of javax/swing/plaf/basic/BasicDirectoryModel.java states that "Obsolete - not used" ( in the doc).
>
> The BasicDirectoryModel uses similar methods like fireIntervalAdded, fireIntervalRemoved which calls AbstractListModel#fireIntervalAdded.
> But not sure that these are the alternate methods.Also dont see anything similar to lt(File a, File b).
>
> The method createFloatingFrame in the BasicToolBarUI.java states that it is "No longer used" and also specifies to use BasicToolBarUI.createFloatingWindow(JToolBar).
>
> The class MouseInputHandler in BasicMenuUI.java and classes PropertyChangeHandler, VSBChangeListener, HSBChangeListener, ViewportChangeHandler in BasicScrollPaneUI.java states that(as comments inside the class)
> "This class exists only for backward compatibility. All
> its functionality has been moved into Handler."
> we can add the above in the doc for these classes.

OK. Please add these statements in the doc, wherever possible.
Also, try to run all jtreg/jck tests with these classes/methods removed so that we dont get any surprises once they are removed.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1958
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8049700: Deprecate obsolete classes and methods in javax/swing/plaf/basic [v3]

Tejpal Rebari-2
In reply to this post by Tejpal Rebari-2
> Please review the following fix for jdk17.
> In this fix i have deprecated and marked for removal following classes and methods
>    public void intervalAdded(ListDataEvent e)
>    public void intervalRemoved(ListDataEvent e)
>    protected boolean lt(File a, File b) in BasicDirectoryModel.java
>
>    inner class PropertyChangeHandler, VSBChangeListener, HSBChangeListener,
>    ViewportChangeHandler in BasicScrollPaneUI.java
>    inner class MouseInputHandler in BasicMenuItemUI.java
>    method BasicToolBarUI.java#createFloatingFrame
>
> From 8049700 not deprecated the paintText(Graphics g, JComponent c, Rectangle textRect, String text) method in BasicButtonUI  as AquaButtonUI, MetalButtonUI and MetalToggleButtonUI overrides it.
> Similarly not deprecated ChangeHandler of BasicMenuUI as AquaMenuUI and MotifMenuUI uses this class.

Tejpal Rebari has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:

 - Merge remote-tracking branch 'upstream/master' into 8049700
 - minor correction
 - initial fix

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/1958/files
  - new: https://git.openjdk.java.net/jdk/pull/1958/files/9bdb67a3..487c3447

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1958&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1958&range=01-02

  Stats: 107189 lines in 2673 files changed: 40250 ins; 39520 del; 27419 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1958.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1958/head:pull/1958

PR: https://git.openjdk.java.net/jdk/pull/1958
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8049700: Deprecate obsolete classes and methods in javax/swing/plaf/basic [v4]

Tejpal Rebari-2
In reply to this post by Prasanta Sadhukhan-2
On Mon, 25 Jan 2021 12:14:51 GMT, Prasanta Sadhukhan <[hidden email]> wrote:

> > The methods intervalAdded(ListDataEvent e) ,intervalRemoved(ListDataEvent e) and lt(File a, File b) of javax/swing/plaf/basic/BasicDirectoryModel.java states that "Obsolete - not used" ( in the doc).
> > The BasicDirectoryModel uses similar methods like fireIntervalAdded, fireIntervalRemoved which calls AbstractListModel#fireIntervalAdded.
> > But not sure that these are the alternate methods.Also dont see anything similar to lt(File a, File b).
> > The method createFloatingFrame in the BasicToolBarUI.java states that it is "No longer used" and also specifies to use BasicToolBarUI.createFloatingWindow(JToolBar).
> > The class MouseInputHandler in BasicMenuUI.java and classes PropertyChangeHandler, VSBChangeListener, HSBChangeListener, ViewportChangeHandler in BasicScrollPaneUI.java states that(as comments inside the class)
> > "This class exists only for backward compatibility. All
> > its functionality has been moved into Handler."
> > we can add the above in the doc for these classes.
>
> OK. Please add these statements in the doc, wherever possible.
I have updated the documentation for some of the classes. Also changed copyright year.
> Also, try to run all jtreg/jck tests with these classes/methods removed so that we dont get any surprises once they are removed.
i have ran all the jtreg/jck tests ,the link is in bug description.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1958
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8049700: Deprecate obsolete classes and methods in javax/swing/plaf/basic [v4]

Tejpal Rebari-2
In reply to this post by Tejpal Rebari-2
> Please review the following fix for jdk17.
> In this fix i have deprecated and marked for removal following classes and methods
>    public void intervalAdded(ListDataEvent e)
>    public void intervalRemoved(ListDataEvent e)
>    protected boolean lt(File a, File b) in BasicDirectoryModel.java
>
>    inner class PropertyChangeHandler, VSBChangeListener, HSBChangeListener,
>    ViewportChangeHandler in BasicScrollPaneUI.java
>    inner class MouseInputHandler in BasicMenuItemUI.java
>    method BasicToolBarUI.java#createFloatingFrame
>
> From 8049700 not deprecated the paintText(Graphics g, JComponent c, Rectangle textRect, String text) method in BasicButtonUI  as AquaButtonUI, MetalButtonUI and MetalToggleButtonUI overrides it.
> Similarly not deprecated ChangeHandler of BasicMenuUI as AquaMenuUI and MotifMenuUI uses this class.

Tejpal Rebari has updated the pull request incrementally with one additional commit since the last revision:

  updated documentation

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/1958/files
  - new: https://git.openjdk.java.net/jdk/pull/1958/files/487c3447..cf0bc946

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1958&range=03
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1958&range=02-03

  Stats: 24 lines in 4 files changed: 13 ins; 0 del; 11 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1958.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1958/head:pull/1958

PR: https://git.openjdk.java.net/jdk/pull/1958
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8049700: Deprecate obsolete classes and methods in javax/swing/plaf/basic [v4]

Prasanta Sadhukhan-2
On Mon, 1 Feb 2021 07:19:10 GMT, Tejpal Rebari <[hidden email]> wrote:

>> Please review the following fix for jdk17.
>> In this fix i have deprecated and marked for removal following classes and methods
>>    public void intervalAdded(ListDataEvent e)
>>    public void intervalRemoved(ListDataEvent e)
>>    protected boolean lt(File a, File b) in BasicDirectoryModel.java
>>
>>    inner class PropertyChangeHandler, VSBChangeListener, HSBChangeListener,
>>    ViewportChangeHandler in BasicScrollPaneUI.java
>>    inner class MouseInputHandler in BasicMenuItemUI.java
>>    method BasicToolBarUI.java#createFloatingFrame
>>
>> From 8049700 not deprecated the paintText(Graphics g, JComponent c, Rectangle textRect, String text) method in BasicButtonUI  as AquaButtonUI, MetalButtonUI and MetalToggleButtonUI overrides it.
>> Similarly not deprecated ChangeHandler of BasicMenuUI as AquaMenuUI and MotifMenuUI uses this class.
>
> Tejpal Rebari has updated the pull request incrementally with one additional commit since the last revision:
>
>   updated documentation

It probably will need CSR

-------------

Marked as reviewed by psadhukhan (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/1958
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8049700: Deprecate obsolete classes and methods in javax/swing/plaf/basic [v4]

Tejpal Rebari-2
On Mon, 1 Feb 2021 08:56:32 GMT, Prasanta Sadhukhan <[hidden email]> wrote:

>> Tejpal Rebari has updated the pull request incrementally with one additional commit since the last revision:
>>
>>   updated documentation
>
> It probably will need CSR

I have created CSR : [JDK-8260921](https://bugs.openjdk.java.net/browse/JDK-8260921)
Please take a look.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1958
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8049700: Deprecate obsolete classes and methods in javax/swing/plaf/basic [v5]

Tejpal Rebari-2
In reply to this post by Tejpal Rebari-2
> Please review the following fix for jdk17.
> In this fix i have deprecated and marked for removal following classes and methods
>    public void intervalAdded(ListDataEvent e)
>    public void intervalRemoved(ListDataEvent e)
>    protected boolean lt(File a, File b) in BasicDirectoryModel.java
>
>    inner class PropertyChangeHandler, VSBChangeListener, HSBChangeListener,
>    ViewportChangeHandler in BasicScrollPaneUI.java
>    inner class MouseInputHandler in BasicMenuItemUI.java
>    method BasicToolBarUI.java#createFloatingFrame
>
> From 8049700 not deprecated the paintText(Graphics g, JComponent c, Rectangle textRect, String text) method in BasicButtonUI  as AquaButtonUI, MetalButtonUI and MetalToggleButtonUI overrides it.
> Similarly not deprecated ChangeHandler of BasicMenuUI as AquaMenuUI and MotifMenuUI uses this class.

Tejpal Rebari has updated the pull request incrementally with one additional commit since the last revision:

  removed jdk version from @deprecated javadoc tag

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/1958/files
  - new: https://git.openjdk.java.net/jdk/pull/1958/files/cf0bc946..6b989061

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1958&range=04
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1958&range=03-04

  Stats: 15 lines in 4 files changed: 1 ins; 0 del; 14 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1958.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1958/head:pull/1958

PR: https://git.openjdk.java.net/jdk/pull/1958
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8049700: Deprecate obsolete classes and methods in javax/swing/plaf/basic [v6]

Tejpal Rebari-2
In reply to this post by Tejpal Rebari-2
> Please review the following fix for jdk17.
> In this fix i have deprecated and marked for removal following classes and methods
>    public void intervalAdded(ListDataEvent e)
>    public void intervalRemoved(ListDataEvent e)
>    protected boolean lt(File a, File b) in BasicDirectoryModel.java
>
>    inner class PropertyChangeHandler, VSBChangeListener, HSBChangeListener,
>    ViewportChangeHandler in BasicScrollPaneUI.java
>    inner class MouseInputHandler in BasicMenuItemUI.java
>    method BasicToolBarUI.java#createFloatingFrame
>
> From 8049700 not deprecated the paintText(Graphics g, JComponent c, Rectangle textRect, String text) method in BasicButtonUI  as AquaButtonUI, MetalButtonUI and MetalToggleButtonUI overrides it.
> Similarly not deprecated ChangeHandler of BasicMenuUI as AquaMenuUI and MotifMenuUI uses this class.

Tejpal Rebari has updated the pull request incrementally with one additional commit since the last revision:

  removed deprecation from methods of class which is also getting deprecated

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/1958/files
  - new: https://git.openjdk.java.net/jdk/pull/1958/files/6b989061..7d674c13

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1958&range=05
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1958&range=04-05

  Stats: 21 lines in 2 files changed: 0 ins; 21 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1958.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1958/head:pull/1958

PR: https://git.openjdk.java.net/jdk/pull/1958
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8049700: Deprecate obsolete classes and methods in javax/swing/plaf/basic [v6]

Phil Race
On Tue, 9 Feb 2021 07:27:00 GMT, Tejpal Rebari <[hidden email]> wrote:

>> Please review the following fix for jdk17.
>> In this fix i have deprecated and marked for removal following classes and methods
>>    public void intervalAdded(ListDataEvent e)
>>    public void intervalRemoved(ListDataEvent e)
>>    protected boolean lt(File a, File b) in BasicDirectoryModel.java
>>
>>    inner class PropertyChangeHandler, VSBChangeListener, HSBChangeListener,
>>    ViewportChangeHandler in BasicScrollPaneUI.java
>>    inner class MouseInputHandler in BasicMenuItemUI.java
>>    method BasicToolBarUI.java#createFloatingFrame
>>
>> From 8049700 not deprecated the paintText(Graphics g, JComponent c, Rectangle textRect, String text) method in BasicButtonUI  as AquaButtonUI, MetalButtonUI and MetalToggleButtonUI overrides it.
>> Similarly not deprecated ChangeHandler of BasicMenuUI as AquaMenuUI and MotifMenuUI uses this class.
>
> Tejpal Rebari has updated the pull request incrementally with one additional commit since the last revision:
>
>   removed deprecation from methods of class which is also getting deprecated

Are these methods all expected to be used only by a L&F rather than an application ?
If by an application, then forRemoval seems too strong to me.
If by a L&F then I think you need to go research what open source L&Fs there are out there and see how many of them are affected. Then we can decide about forRemoval.

-------------

Changes requested by prr (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/1958
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8049700: Deprecate obsolete classes and methods in javax/swing/plaf/basic [v7]

Tejpal Rebari-2
In reply to this post by Tejpal Rebari-2
> Please review the following fix for jdk17.
> In this fix i have deprecated and marked for removal following classes and methods
>    public void intervalAdded(ListDataEvent e)
>    public void intervalRemoved(ListDataEvent e)
>    protected boolean lt(File a, File b) in BasicDirectoryModel.java
>
>    inner class PropertyChangeHandler, VSBChangeListener, HSBChangeListener,
>    ViewportChangeHandler in BasicScrollPaneUI.java
>    inner class MouseInputHandler in BasicMenuItemUI.java
>    method BasicToolBarUI.java#createFloatingFrame
>
> From 8049700 not deprecated the paintText(Graphics g, JComponent c, Rectangle textRect, String text) method in BasicButtonUI  as AquaButtonUI, MetalButtonUI and MetalToggleButtonUI overrides it.
> Similarly not deprecated ChangeHandler of BasicMenuUI as AquaMenuUI and MotifMenuUI uses this class.

Tejpal Rebari has updated the pull request incrementally with one additional commit since the last revision:

  removed forRemoval

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/1958/files
  - new: https://git.openjdk.java.net/jdk/pull/1958/files/7d674c13..7dd2b39a

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1958&range=06
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1958&range=05-06

  Stats: 9 lines in 4 files changed: 0 ins; 0 del; 9 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1958.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1958/head:pull/1958

PR: https://git.openjdk.java.net/jdk/pull/1958
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8049700: Deprecate obsolete classes and methods in javax/swing/plaf/basic [v6]

Tejpal Rebari-2
In reply to this post by Phil Race
On Wed, 10 Feb 2021 18:04:16 GMT, Phil Race <[hidden email]> wrote:

> Are these methods all expected to be used only by a L&F rather than an application ?
> If by an application, then forRemoval seems too strong to me.
> If by a L&F then I think you need to go research what open source L&Fs there are out there and see how many of them are affected. Then we can decide about forRemoval.

After the fix i have ran all the automated jtreg and jck (link is in the JBS) and not seeing any issues there.
I also ran SwingSet2 with Aqua, Metal, Motif, Nimbus, Windows, Windows Classic, and GTK LookAndFeel
 with debug statement in each of the deprecated methods and class,
and none of the methods and classes are getting called in any of the LAF's.

For now we can remove the "forRemoval".

-------------

PR: https://git.openjdk.java.net/jdk/pull/1958
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8049700: Deprecate obsolete classes and methods in javax/swing/plaf/basic [v6]

Tejpal Rebari-2
On Fri, 19 Feb 2021 15:45:55 GMT, Tejpal Rebari <[hidden email]> wrote:

> Are these methods all expected to be used only by a L&F rather than an application ?
> If by an application, then forRemoval seems too strong to me.
> If by a L&F then I think you need to go research what open source L&Fs there are out there and see how many of them are affected. Then we can decide about forRemoval.

There are open source LAFs which will be affected by removing these.
Like FlatLaf https://www.formdev.com/flatlaf/ uses BasicScrollPaneUI$PropertyChangeHandler.
Also i have removed the "forRemoval" for now.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1958
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8049700: Deprecate obsolete classes and methods in javax/swing/plaf/basic [v8]

Tejpal Rebari-2
In reply to this post by Tejpal Rebari-2
> Please review the following fix for jdk17.
> In this fix i have deprecated and marked for removal following classes and methods
>    public void intervalAdded(ListDataEvent e)
>    public void intervalRemoved(ListDataEvent e)
>    protected boolean lt(File a, File b) in BasicDirectoryModel.java
>
>    inner class PropertyChangeHandler, VSBChangeListener, HSBChangeListener,
>    ViewportChangeHandler in BasicScrollPaneUI.java
>    inner class MouseInputHandler in BasicMenuItemUI.java
>    method BasicToolBarUI.java#createFloatingFrame
>
> From 8049700 not deprecated the paintText(Graphics g, JComponent c, Rectangle textRect, String text) method in BasicButtonUI  as AquaButtonUI, MetalButtonUI and MetalToggleButtonUI overrides it.
> Similarly not deprecated ChangeHandler of BasicMenuUI as AquaMenuUI and MotifMenuUI uses this class.

Tejpal Rebari has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains eight additional commits since the last revision:

 - Merge remote-tracking branch 'upstream/master' into 8049700
 - removed forRemoval
 - removed deprecation from methods of class which is also getting deprecated
 - removed jdk version from @deprecated javadoc tag
 - updated documentation
 - Merge remote-tracking branch 'upstream/master' into 8049700
 - minor correction
 - initial fix

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/1958/files
  - new: https://git.openjdk.java.net/jdk/pull/1958/files/7dd2b39a..88a8c475

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1958&range=07
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1958&range=06-07

  Stats: 69867 lines in 2030 files changed: 41455 ins; 17817 del; 10595 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1958.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1958/head:pull/1958

PR: https://git.openjdk.java.net/jdk/pull/1958
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8049700: Deprecate obsolete classes and methods in javax/swing/plaf/basic [v6]

Tejpal Rebari-2
In reply to this post by Phil Race
On Wed, 10 Feb 2021 18:04:16 GMT, Phil Race <[hidden email]> wrote:

>> Tejpal Rebari has updated the pull request incrementally with one additional commit since the last revision:
>>
>>   removed deprecation from methods of class which is also getting deprecated
>
> Are these methods all expected to be used only by a L&F rather than an application ?
> If by an application, then forRemoval seems too strong to me.
> If by a L&F then I think you need to go research what open source L&Fs there are out there and see how many of them are affected. Then we can decide about forRemoval.

@prrace Please take a look.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1958
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8049700: Deprecate obsolete classes and methods in javax/swing/plaf/basic [v6]

Tejpal Rebari-2
In reply to this post by Phil Race
On Wed, 10 Feb 2021 18:04:16 GMT, Phil Race <[hidden email]> wrote:

>> Tejpal Rebari has updated the pull request incrementally with one additional commit since the last revision:
>>
>>   removed deprecation from methods of class which is also getting deprecated
>
> Are these methods all expected to be used only by a L&F rather than an application ?
> If by an application, then forRemoval seems too strong to me.
> If by a L&F then I think you need to go research what open source L&Fs there are out there and see how many of them are affected. Then we can decide about forRemoval.

@prrace any more comments on this ?

-------------

PR: https://git.openjdk.java.net/jdk/pull/1958
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8049700: Deprecate obsolete classes and methods in javax/swing/plaf/basic [v8]

Phil Race
In reply to this post by Tejpal Rebari-2
On Thu, 4 Mar 2021 05:50:18 GMT, Tejpal Rebari <[hidden email]> wrote:

>> Please review the following fix for jdk17.
>> In this fix i have deprecated and marked for removal following classes and methods
>>    public void intervalAdded(ListDataEvent e)
>>    public void intervalRemoved(ListDataEvent e)
>>    protected boolean lt(File a, File b) in BasicDirectoryModel.java
>>
>>    inner class PropertyChangeHandler, VSBChangeListener, HSBChangeListener,
>>    ViewportChangeHandler in BasicScrollPaneUI.java
>>    inner class MouseInputHandler in BasicMenuItemUI.java
>>    method BasicToolBarUI.java#createFloatingFrame
>>
>> From 8049700 not deprecated the paintText(Graphics g, JComponent c, Rectangle textRect, String text) method in BasicButtonUI  as AquaButtonUI, MetalButtonUI and MetalToggleButtonUI overrides it.
>> Similarly not deprecated ChangeHandler of BasicMenuUI as AquaMenuUI and MotifMenuUI uses this class.
>
> Tejpal Rebari has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains eight additional commits since the last revision:
>
>  - Merge remote-tracking branch 'upstream/master' into 8049700
>  - removed forRemoval
>  - removed deprecation from methods of class which is also getting deprecated
>  - removed jdk version from @deprecated javadoc tag
>  - updated documentation
>  - Merge remote-tracking branch 'upstream/master' into 8049700
>  - minor correction
>  - initial fix

Marked as reviewed by prr (Reviewer).

-------------

PR: https://git.openjdk.java.net/jdk/pull/1958
12