From psadhukhan at openjdk.java.net Wed Sep 1 04:12:45 2021 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 1 Sep 2021 04:12:45 GMT Subject: RFR: 8268084: [macos] Disabled JMenuItem arrow is not disabled In-Reply-To: References: Message-ID: <3XH7rtTGtyOKfLK_jeYQEhufR0IhY3aALE1fVHhHz6s=.2fa1858a-167d-46de-9f42-ec7088a8596b@github.com> On Tue, 31 Aug 2021 22:35:10 GMT, Sergey Bylokhov wrote: > > > > In native app, same menuitem arrow is disabled for disabled menuitem. > > How it will work if the "apple.laf.useScreenMenuBar" property is set, will the arrow look the same(disabled) as after this fix? Yes, it is disabled. ------------- PR: https://git.openjdk.java.net/jdk/pull/5310 From github.com+741251+turbanoff at openjdk.java.net Wed Sep 1 10:44:07 2021 From: github.com+741251+turbanoff at openjdk.java.net (Andrey Turbanov) Date: Wed, 1 Sep 2021 10:44:07 GMT Subject: RFR: 8273168: Remove superfluous use of boxing in java.desktop [v2] In-Reply-To: References: Message-ID: > parseInt/parseLong/parseShort/parseByte/parseFloat should be preferred, as they return primitives. While valueOf returns boxed object. Andrey Turbanov 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 two additional commits since the last revision: - Merge remote-tracking branch 'origin/master' into redundant_boxing_in_java.desktop - [PATCH] Cleanup redundant boxing in java.desktop module parseInt/parseLong/parseShort/parseByte/parseFloat should be preferred, as they return primitives. While valueOf returns boxed object. ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5313/files - new: https://git.openjdk.java.net/jdk/pull/5313/files/c24b15a5..a6bdbb7d Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5313&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5313&range=00-01 Stats: 995 lines in 34 files changed: 688 ins; 181 del; 126 mod Patch: https://git.openjdk.java.net/jdk/pull/5313.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5313/head:pull/5313 PR: https://git.openjdk.java.net/jdk/pull/5313 From philip.race at oracle.com Wed Sep 1 22:04:48 2021 From: philip.race at oracle.com (Philip Race) Date: Wed, 1 Sep 2021 15:04:48 -0700 Subject: Fwd: Project Wakefield announcement and welcome In-Reply-To: <09dddbdd-d4d2-c6f4-1622-583239d91e4a@oracle.com> References: <09dddbdd-d4d2-c6f4-1622-583239d91e4a@oracle.com> Message-ID: <0ec5eb6b-4d5f-2233-6441-12be8738650f@oracle.com> FYI -------- Forwarded Message -------- Subject: Project Wakefield announcement and welcome Date: Wed, 1 Sep 2021 14:59:30 -0700 From: Philip Race To: wakefield-dev at openjdk.java.net Hi all, The project has been recorded in the OpenJDK census : https://openjdk.java.net/census#wakefield The email list (to which I sent this) https://mail.openjdk.java.net/mailman/listinfo/wakefield-dev has been set up pre-populated with the initial committers. If you are a committer who did not previously have an OpenJDK ID you should have received an invitation to register. Don't ignore it - it will expire in 14 days from when it was sent. We also have a web page https://openjdk.java.net/projects/wakefield/ which is still just pro-forma I'll add something more once we have it :-) The wiki is also being set up : https://wiki.openjdk.java.net/display/wakefield Unlike the Project Page everyone who is a committer will be able to edit the wiki The project repo has not yet been created but is expected to be created this week. I will send a follow up on that once it is done. I'll also inform the various client lists (forward please do NOT cross post !)? of the new mailing list -phil. -------------- next part -------------- An HTML attachment was scrubbed... URL: From serb at openjdk.java.net Wed Sep 1 23:26:32 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 1 Sep 2021 23:26:32 GMT Subject: RFR: 8273043: [TEST_BUG] Automate NimbusJTreeSelTextColor.java [v3] In-Reply-To: References: <_106A4do7gAjpYA6dBKdawZoC912qVdEiPNn3fRhG1M=.effe33ed-0e83-44b0-b047-5d4d7ad5dc3d@github.com> Message-ID: On Tue, 31 Aug 2021 19:10:53 GMT, Alexey Ivanov wrote: >> Automated NimbusJTreeSelTextColor.java test which is added under [JDK-8271315](https://bugs.openjdk.java.net/browse/JDK-8271315). >> >> It passes with the recent build of JDK 18. >> It fails with JDK 18 build 7 where [JDK-8266510](https://bugs.openjdk.java.net/browse/JDK-8266510) is not fixed yet: >> >> >> Exception in thread "main" java.lang.RuntimeException: Unexpected color found: ff000000 at (4, 9); >> foreground: ffffffff; background: ff39698a - check image.png >> at NimbusJTreeSelTextColor.checkColors(NimbusJTreeSelTextColor.java:106) >> at NimbusJTreeSelTextColor.main(NimbusJTreeSelTextColor.java:70) >> >> >> The line is wrapped for readability. In this case the text is black instead of white. > > Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: > > Skip macOS: can't disable text antialiasing Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5269 From serb at openjdk.java.net Wed Sep 1 23:59:31 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 1 Sep 2021 23:59:31 GMT Subject: RFR: 8268084: [macos] Disabled JMenuItem arrow is not disabled In-Reply-To: References: Message-ID: On Tue, 31 Aug 2021 06:09:38 GMT, Prasanta Sadhukhan wrote: > It is seen in macos disabled JMenuItem arrow is not disabled even though JMenuItem itself is disabled. > In native app, same menuitem arrow is disabled for disabled menuitem. > > Issue is when AquaMenuPainter#paintMenuItem() is called, it tries to draw a ImageIcon image of the arrow via ImageIcon#paintIcon which tries to generate MultiResolutionCachedImage via getResolutionVariant() by calling AquaUtils#generateFilteredImage. > It does not take into account if disabled arrow icon image needs to be drawn or not, so it is always enabled. > > Proposed fix is to generate a disabled ImageIcon image of the same arrow icon and use it for disabled state. src/java.desktop/macosx/classes/com/apple/laf/AquaMenuPainter.java line 301: > 299: arrowIcon = new ImageIconUIResource(GrayFilter. > 300: createDisabledImage(((ImageIcon)arrowIcon).getImage())); > 301: } Maybe we do not need to duplicate LookAndFeel.getDisabledIcon() here and create a new disabled icon on each call for each menu item? What about tweak the aqua arrow icon, so it will paint itself correctly for enabled/disabled states. Similar to how the MenuArrowIcon from the WindowsLookAndFeel and MetalLookAndFeel works. ------------- PR: https://git.openjdk.java.net/jdk/pull/5310 From psadhukhan at openjdk.java.net Thu Sep 2 04:21:32 2021 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 2 Sep 2021 04:21:32 GMT Subject: RFR: 8268084: [macos] Disabled JMenuItem arrow is not disabled In-Reply-To: References: Message-ID: On Wed, 1 Sep 2021 23:57:07 GMT, Sergey Bylokhov wrote: >> It is seen in macos disabled JMenuItem arrow is not disabled even though JMenuItem itself is disabled. >> In native app, same menuitem arrow is disabled for disabled menuitem. >> >> Issue is when AquaMenuPainter#paintMenuItem() is called, it tries to draw a ImageIcon image of the arrow via ImageIcon#paintIcon which tries to generate MultiResolutionCachedImage via getResolutionVariant() by calling AquaUtils#generateFilteredImage. >> It does not take into account if disabled arrow icon image needs to be drawn or not, so it is always enabled. >> >> Proposed fix is to generate a disabled ImageIcon image of the same arrow icon and use it for disabled state. > > src/java.desktop/macosx/classes/com/apple/laf/AquaMenuPainter.java line 301: > >> 299: arrowIcon = new ImageIconUIResource(GrayFilter. >> 300: createDisabledImage(((ImageIcon)arrowIcon).getImage())); >> 301: } > > Maybe we do not need to duplicate LookAndFeel.getDisabledIcon() here and create a new disabled icon on each call for each menu item? > What about tweak the aqua arrow icon, so it will paint itself correctly for enabled/disabled states. Similar to how the MenuArrowIcon from the WindowsLookAndFeel and MetalLookAndFeel works. In MenuArrowIcon, the arrow icon is drawn there itself using drawPolygon but in Aqua, it is drawn via imageicon image so it will be a change in design and will make it more complex and it might introduce bug in hidpi/retina. I will like to keep it simple following the current design in aqua. ------------- PR: https://git.openjdk.java.net/jdk/pull/5310 From serb at openjdk.java.net Thu Sep 2 04:49:32 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 2 Sep 2021 04:49:32 GMT Subject: RFR: 8268084: [macos] Disabled JMenuItem arrow is not disabled In-Reply-To: References: Message-ID: On Thu, 2 Sep 2021 04:18:47 GMT, Prasanta Sadhukhan wrote: >> src/java.desktop/macosx/classes/com/apple/laf/AquaMenuPainter.java line 301: >> >>> 299: arrowIcon = new ImageIconUIResource(GrayFilter. >>> 300: createDisabledImage(((ImageIcon)arrowIcon).getImage())); >>> 301: } >> >> Maybe we do not need to duplicate LookAndFeel.getDisabledIcon() here and create a new disabled icon on each call for each menu item? >> What about tweak the aqua arrow icon, so it will paint itself correctly for enabled/disabled states. Similar to how the MenuArrowIcon from the WindowsLookAndFeel and MetalLookAndFeel works. > > In MenuArrowIcon, the arrow icon is drawn there itself using drawPolygon but in Aqua, it is drawn via imageicon image so it will be a change in design and will make it more complex and it might introduce bug in hidpi/retina. I will like to keep it simple following the current design in aqua. On windows it is painted via skin, I guess in GTK as well. But it really does not matter how it is drawn, the important part is that the icon itself knows how to draw proper appearance. ------------- PR: https://git.openjdk.java.net/jdk/pull/5310 From psadhukhan at openjdk.java.net Thu Sep 2 09:20:29 2021 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 2 Sep 2021 09:20:29 GMT Subject: RFR: 8268084: [macos] Disabled JMenuItem arrow is not disabled In-Reply-To: References: Message-ID: On Thu, 2 Sep 2021 04:46:48 GMT, Sergey Bylokhov wrote: >> In MenuArrowIcon, the arrow icon is drawn there itself using drawPolygon but in Aqua, it is drawn via imageicon image so it will be a change in design and will make it more complex and it might introduce bug in hidpi/retina. I will like to keep it simple following the current design in aqua. > > On windows it is painted via skin, I guess in GTK as well. But it really does not matter how it is drawn, the important part is that the icon itself knows how to draw proper appearance. In other L&Fs, it creates their own icon for ex, MetalLookAndFeel "MenuItem.arrowIcon",(LazyValue) t -> MetalIconFactory.getMenuItemArrowIcon(), and WindowsLookAndFeel "MenuItem.arrowIcon", menuItemArrowIcon, but for AquaL&F it does not create it's own factory icon and rely on BasicIconFactory$MenuItemArrowIcon, so tweaking aqua arrow icon inline with how other do will cause design change, so I think this fix caters to the problem in view of this aqua limitation. ------------- PR: https://git.openjdk.java.net/jdk/pull/5310 From serb at openjdk.java.net Thu Sep 2 09:31:26 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 2 Sep 2021 09:31:26 GMT Subject: RFR: 8268084: [macos] Disabled JMenuItem arrow is not disabled In-Reply-To: References: Message-ID: On Thu, 2 Sep 2021 09:17:50 GMT, Prasanta Sadhukhan wrote: > but for AquaL&F it does not create it's own factory icon and rely on BasicIconFactory$MenuItemArrowIcon, so tweaking aqua arrow icon inline with how other do will cause design change, so I think this fix caters to the problem in view of this aqua limitation. Are you sure that the Aqua does not have its own factory? the BasicIconFactory$MenuItemArrowIcon is an empty class. AquaLookAndFeel.java: "Menu.arrowIcon",(LazyValue) t -> AquaImageFactory.getMenuArrowIcon(), ------------- PR: https://git.openjdk.java.net/jdk/pull/5310 From psadhukhan at openjdk.java.net Thu Sep 2 09:56:31 2021 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 2 Sep 2021 09:56:31 GMT Subject: RFR: 8268084: [macos] Disabled JMenuItem arrow is not disabled In-Reply-To: References: Message-ID: <1kUNffPL4d2-UK85nC0agGhNmAduDnzvFidwpeD5dIg=.df57f3b2-b53d-4ff9-ab4f-d0d2419b09a8@github.com> On Thu, 2 Sep 2021 09:26:16 GMT, Sergey Bylokhov wrote: >> In other L&Fs, it creates their own icon >> for ex, MetalLookAndFeel >> "MenuItem.arrowIcon",(LazyValue) t -> MetalIconFactory.getMenuItemArrowIcon(), >> and WindowsLookAndFeel >> "MenuItem.arrowIcon", menuItemArrowIcon, >> >> but for AquaL&F it does not create it's own factory icon and rely on BasicIconFactory$MenuItemArrowIcon, so tweaking aqua arrow icon inline with how other do will cause design change, so I think this fix caters to the problem in view of this aqua limitation. > >> but for AquaL&F it does not create it's own factory icon and rely on BasicIconFactory$MenuItemArrowIcon, so tweaking aqua arrow icon inline with how other do will cause design change, so I think this fix caters to the problem in view of this aqua limitation. > > Are you sure that the Aqua does not have its own factory? the BasicIconFactory$MenuItemArrowIcon is an empty class. > AquaLookAndFeel.java: > "Menu.arrowIcon",(LazyValue) t -> AquaImageFactory.getMenuArrowIcon(), That is for MenuArrowIcon which is also there for Metal and Windows L&F in addition with MenuItemArrowIcon(). Aqua does not have it for MenuItem. The control for aqua menuitem goes via ImageIcon#paintIcon for menuitem arrow which does not have enabled/disabled parameter so it was done the way it is now. ------------- PR: https://git.openjdk.java.net/jdk/pull/5310 From serb at openjdk.java.net Thu Sep 2 10:52:29 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 2 Sep 2021 10:52:29 GMT Subject: RFR: 8268084: [macos] Disabled JMenuItem arrow is not disabled In-Reply-To: <1kUNffPL4d2-UK85nC0agGhNmAduDnzvFidwpeD5dIg=.df57f3b2-b53d-4ff9-ab4f-d0d2419b09a8@github.com> References: <1kUNffPL4d2-UK85nC0agGhNmAduDnzvFidwpeD5dIg=.df57f3b2-b53d-4ff9-ab4f-d0d2419b09a8@github.com> Message-ID: <4reoYVbq2uXhQPYmkPy1TE_-IsOwbE-zTblLaFON0ws=.a7851d7b-9f9b-4348-b1cc-c95ce67e1eaf@github.com> On Thu, 2 Sep 2021 09:53:34 GMT, Prasanta Sadhukhan wrote: > That is for MenuArrowIcon which is also there for Metal and Windows L&F in addition with MenuItemArrowIcon(). Aqua does not have it for MenuItem. But this icon is used for the menuitem as well, isn't it? You can add this line to the test and check: UIManager.setLookAndFeel("com.apple.laf.AquaLookAndFeel"); + UIManager.getDefaults().put("Menu.arrowIcon", ""); > The control for aqua menuitem goes via ImageIcon#paintIcon for menuitem arrow which does not have enabled/disabled parameter so it was done the way it is now. I guess it is go via Icon.paintIcon() at AquaMenuPainter:408 , this is similar to metal and windows L&Fs. The first parameter of paintIcon is a component, so all information can be read there. And depending on the state that icon can draws default arrow, or creates/caches the disabled icon. ------------- PR: https://git.openjdk.java.net/jdk/pull/5310 From psadhukhan at openjdk.java.net Thu Sep 2 11:16:29 2021 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 2 Sep 2021 11:16:29 GMT Subject: RFR: 8268084: [macos] Disabled JMenuItem arrow is not disabled In-Reply-To: <4reoYVbq2uXhQPYmkPy1TE_-IsOwbE-zTblLaFON0ws=.a7851d7b-9f9b-4348-b1cc-c95ce67e1eaf@github.com> References: <1kUNffPL4d2-UK85nC0agGhNmAduDnzvFidwpeD5dIg=.df57f3b2-b53d-4ff9-ab4f-d0d2419b09a8@github.com> <4reoYVbq2uXhQPYmkPy1TE_-IsOwbE-zTblLaFON0ws=.a7851d7b-9f9b-4348-b1cc-c95ce67e1eaf@github.com> Message-ID: On Thu, 2 Sep 2021 10:48:40 GMT, Sergey Bylokhov wrote: >> That is for MenuArrowIcon which is also there for Metal and Windows L&F in addition with MenuItemArrowIcon(). Aqua does not have it for MenuItem. >> The control for aqua menuitem goes via ImageIcon#paintIcon for menuitem arrow which does not have enabled/disabled parameter so it was done the way it is now. > >> That is for MenuArrowIcon which is also there for Metal and Windows L&F in addition with MenuItemArrowIcon(). Aqua does not have it for MenuItem. > > But this icon is used for the menuitem as well, isn't it? You can add this line to the test and check: > > > UIManager.setLookAndFeel("com.apple.laf.AquaLookAndFeel"); > + UIManager.getDefaults().put("Menu.arrowIcon", ""); > > >> The control for aqua menuitem goes via ImageIcon#paintIcon for menuitem arrow which does not have enabled/disabled parameter so it was done the way it is now. > > I guess it is go via Icon.paintIcon() at AquaMenuPainter:408 , this is similar to metal and windows L&Fs. The first parameter of paintIcon is a component, so all information can be read there. And depending on the state that icon can draws default arrow, or creates/caches the disabled icon. > > > That is for MenuArrowIcon which is also there for Metal and Windows L&F in addition with MenuItemArrowIcon(). Aqua > And depending on the state that icon can draws default arrow, or creates/caches the disabled icon. I guess that is what it is being done, no? Instead of inside paintArrow() method, I am creating the disabled icon outside. ------------- PR: https://git.openjdk.java.net/jdk/pull/5310 From psadhukhan at openjdk.java.net Thu Sep 2 12:41:58 2021 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 2 Sep 2021 12:41:58 GMT Subject: RFR: 8268084: [macos] Disabled JMenuItem arrow is not disabled [v2] In-Reply-To: References: Message-ID: > It is seen in macos disabled JMenuItem arrow is not disabled even though JMenuItem itself is disabled. > In native app, same menuitem arrow is disabled for disabled menuitem. > > Issue is when AquaMenuPainter#paintMenuItem() is called, it tries to draw a ImageIcon image of the arrow via ImageIcon#paintIcon which tries to generate MultiResolutionCachedImage via getResolutionVariant() by calling AquaUtils#generateFilteredImage. > It does not take into account if disabled arrow icon image needs to be drawn or not, so it is always enabled. > > Proposed fix is to generate a disabled ImageIcon image of the same arrow icon and use it for disabled state. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Cache icon ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5310/files - new: https://git.openjdk.java.net/jdk/pull/5310/files/c3510ba1..ba8f30b5 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5310&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5310&range=00-01 Stats: 16 lines in 1 file changed: 10 ins; 4 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/5310.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5310/head:pull/5310 PR: https://git.openjdk.java.net/jdk/pull/5310 From aivanov at openjdk.java.net Thu Sep 2 18:02:00 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Thu, 2 Sep 2021 18:02:00 GMT Subject: RFR: 8049301: Suspicious use of string identity checks in JComponent.setUIProperty [v2] In-Reply-To: References: <1wPT-8HMR4JsKqFFcuWdl_HQWxct7qOyh2-PAv6oyj8=.86b87c1c-51f7-4a7a-aab4-ac79dbeb9ad8@github.com> Message-ID: On Fri, 30 Jul 2021 20:50:05 GMT, Sergey Bylokhov wrote: > > I believe it was an optimisation to make comparison as quick as possible. There are many places in Swing where property keys are compared as object identity rather than using `equals`. If this place is changed, probably all other such places need updating if they haven't been updated to `equals` yet. > > Probably it will be better to roll back this one, and carefully check the usage of "==" for possible replacement by the "equal". That possibility should be proved by some test cases. It's the other way around: `equals` can always be used (but could be slower); however, `==` may produce incorrect results in some cases. Probably, such optimisation `==` vs `equals` doesn't make sense any more and we should replace all usages of `==` with `equals`. ------------- PR: https://git.openjdk.java.net/jdk/pull/4943 From serb at openjdk.java.net Thu Sep 2 18:13:28 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 2 Sep 2021 18:13:28 GMT Subject: RFR: 8268084: [macos] Disabled JMenuItem arrow is not disabled [v2] In-Reply-To: References: Message-ID: On Thu, 2 Sep 2021 12:41:58 GMT, Prasanta Sadhukhan wrote: >> It is seen in macos disabled JMenuItem arrow is not disabled even though JMenuItem itself is disabled. >> In native app, same menuitem arrow is disabled for disabled menuitem. >> >> Issue is when AquaMenuPainter#paintMenuItem() is called, it tries to draw a ImageIcon image of the arrow via ImageIcon#paintIcon which tries to generate MultiResolutionCachedImage via getResolutionVariant() by calling AquaUtils#generateFilteredImage. >> It does not take into account if disabled arrow icon image needs to be drawn or not, so it is always enabled. >> >> Proposed fix is to generate a disabled ImageIcon image of the same arrow icon and use it for disabled state. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Cache icon src/java.desktop/macosx/classes/com/apple/laf/AquaMenuPainter.java line 419: > 417: } else { > 418: arrowIcon.paintIcon(c, g, arrowIconRect.x, arrowIconRect.y); > 419: } It will be even better to implement it in the same way as done in other L&fs like windows/metal. ------------- PR: https://git.openjdk.java.net/jdk/pull/5310 From serb at openjdk.java.net Thu Sep 2 22:59:31 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 2 Sep 2021 22:59:31 GMT Subject: Integrated: 8272805: Avoid looking up standard charsets In-Reply-To: References: Message-ID: On Sun, 22 Aug 2021 02:53:44 GMT, Sergey Bylokhov wrote: > This is the continuation of JDK-8233884, JDK-8271456, and JDK-8272120. > > In many places standard charsets are looked up via their names, for example: > absolutePath.getBytes("UTF-8"); > > This could be done more efficiently(up to x20 time faster) with use of java.nio.charset.StandardCharsets: > absolutePath.getBytes(StandardCharsets.UTF_8); > > The later variant also makes the code cleaner, as it is known not to throw UnsupportedEncodingException in contrary to the former variant. > > This change includes: > * demo/utils > * jdk.xx packages > * Some places were missed in the previous changes. I have found it by tracing the calls to the Charset.forName() by executing tier1,2,3 and desktop tests. > > Some performance discussion: https://github.com/openjdk/jdk/pull/5063 > > Code excluded in this fix: the Xerces library(should be fixed upstream), J2DBench(should be compatible to 1.4), some code in the network(the change there are not straightforward, will do it later). > > Tested by the tier1/tier2/tier3 tests on Linux/Windows/macOS. This pull request has now been integrated. Changeset: 7fff22af Author: Sergey Bylokhov URL: https://git.openjdk.java.net/jdk/commit/7fff22afe711c8c04dbf4cf5b4938d40632e4987 Stats: 364 lines in 53 files changed: 98 ins; 128 del; 138 mod 8272805: Avoid looking up standard charsets Reviewed-by: weijun, naoto, dfuchs, azvegint, erikj ------------- PR: https://git.openjdk.java.net/jdk/pull/5210 From psadhukhan at openjdk.java.net Fri Sep 3 04:16:28 2021 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 3 Sep 2021 04:16:28 GMT Subject: RFR: 8268084: [macos] Disabled JMenuItem arrow is not disabled [v2] In-Reply-To: References: Message-ID: On Thu, 2 Sep 2021 18:10:55 GMT, Sergey Bylokhov wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: >> >> Cache icon > > src/java.desktop/macosx/classes/com/apple/laf/AquaMenuPainter.java line 419: > >> 417: } else { >> 418: arrowIcon.paintIcon(c, g, arrowIconRect.x, arrowIconRect.y); >> 419: } > > It will be even better to implement it in the same way as done in other L&fs like windows/metal. I will like to know how because as it is pointed out, paintArrow delegates drawing to ImageIcon#paintIcon which is in shared code and this is mac specific issue so it needs to be handled before we call ImageIcon#paintIcon ------------- PR: https://git.openjdk.java.net/jdk/pull/5310 From serb at openjdk.java.net Fri Sep 3 05:57:27 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 3 Sep 2021 05:57:27 GMT Subject: RFR: 8268084: [macos] Disabled JMenuItem arrow is not disabled [v2] In-Reply-To: References: Message-ID: On Fri, 3 Sep 2021 04:13:46 GMT, Prasanta Sadhukhan wrote: >> src/java.desktop/macosx/classes/com/apple/laf/AquaMenuPainter.java line 419: >> >>> 417: } else { >>> 418: arrowIcon.paintIcon(c, g, arrowIconRect.x, arrowIconRect.y); >>> 419: } >> >> It will be even better to implement it in the same way as done in other L&fs like windows/metal. > > I will like to know how because as it is pointed out, paintArrow delegates drawing to ImageIcon#paintIcon which is in shared code and this is mac specific issue so it needs to be handled before we call ImageIcon#paintIcon You need to override the paintIcon method in the InvertableImageIcon returned by the AquaImageFactory.getMenuArrowIcon() or you can create `class MenuArrowIcon extends InvertableImageIcon,` and override it there. Also take a look to another usage of InvertableImageIcon for "MenuItemCheckIcon", should we disable it as well? ------------- PR: https://git.openjdk.java.net/jdk/pull/5310 From psadhukhan at openjdk.java.net Fri Sep 3 07:45:09 2021 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 3 Sep 2021 07:45:09 GMT Subject: RFR: 8268084: [macos] Disabled JMenuItem arrow is not disabled [v3] In-Reply-To: References: Message-ID: <67qFREI_qmQ6Qk6THc9KOyYhD-ThzeTJbhc8qjFW8Ck=.8241b090-3f25-4b5d-932e-1443e00085b3@github.com> > It is seen in macos disabled JMenuItem arrow is not disabled even though JMenuItem itself is disabled. > In native app, same menuitem arrow is disabled for disabled menuitem. > > Issue is when AquaMenuPainter#paintMenuItem() is called, it tries to draw a ImageIcon image of the arrow via ImageIcon#paintIcon which tries to generate MultiResolutionCachedImage via getResolutionVariant() by calling AquaUtils#generateFilteredImage. > It does not take into account if disabled arrow icon image needs to be drawn or not, so it is always enabled. > > Proposed fix is to generate a disabled ImageIcon image of the same arrow icon and use it for disabled state. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Override paintIcon ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5310/files - new: https://git.openjdk.java.net/jdk/pull/5310/files/ba8f30b5..63b591cc Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5310&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5310&range=01-02 Stats: 24 lines in 2 files changed: 15 ins; 8 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/5310.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5310/head:pull/5310 PR: https://git.openjdk.java.net/jdk/pull/5310 From psadhukhan at openjdk.java.net Fri Sep 3 07:50:03 2021 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 3 Sep 2021 07:50:03 GMT Subject: RFR: 8268084: [macos] Disabled JMenuItem arrow is not disabled [v4] In-Reply-To: References: Message-ID: > It is seen in macos disabled JMenuItem arrow is not disabled even though JMenuItem itself is disabled. > In native app, same menuitem arrow is disabled for disabled menuitem. > > Issue is when AquaMenuPainter#paintMenuItem() is called, it tries to draw a ImageIcon image of the arrow via ImageIcon#paintIcon which tries to generate MultiResolutionCachedImage via getResolutionVariant() by calling AquaUtils#generateFilteredImage. > It does not take into account if disabled arrow icon image needs to be drawn or not, so it is always enabled. > > Proposed fix is to generate a disabled ImageIcon image of the same arrow icon and use it for disabled state. Prasanta Sadhukhan has updated the pull request incrementally with two additional commits since the last revision: - Override paintIcon - Override paintIcon ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5310/files - new: https://git.openjdk.java.net/jdk/pull/5310/files/63b591cc..d2db8808 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5310&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5310&range=02-03 Stats: 3 lines in 1 file changed: 0 ins; 3 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5310.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5310/head:pull/5310 PR: https://git.openjdk.java.net/jdk/pull/5310 From psadhukhan at openjdk.java.net Sat Sep 4 11:09:19 2021 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Sat, 4 Sep 2021 11:09:19 GMT Subject: RFR: 8268084: [macos] Disabled JMenuItem arrow is not disabled [v5] In-Reply-To: References: Message-ID: > It is seen in macos disabled JMenuItem arrow is not disabled even though JMenuItem itself is disabled. > In native app, same menuitem arrow is disabled for disabled menuitem. > > Issue is when AquaMenuPainter#paintMenuItem() is called, it tries to draw a ImageIcon image of the arrow via ImageIcon#paintIcon which tries to generate MultiResolutionCachedImage via getResolutionVariant() by calling AquaUtils#generateFilteredImage. > It does not take into account if disabled arrow icon image needs to be drawn or not, so it is always enabled. > > Proposed fix is to generate a disabled ImageIcon image of the same arrow icon and use it for disabled state. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Add menuitem checkicon test ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5310/files - new: https://git.openjdk.java.net/jdk/pull/5310/files/d2db8808..3c2f69fa Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5310&range=04 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5310&range=03-04 Stats: 13 lines in 1 file changed: 10 ins; 1 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/5310.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5310/head:pull/5310 PR: https://git.openjdk.java.net/jdk/pull/5310 From psadhukhan at openjdk.java.net Sat Sep 4 11:09:21 2021 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Sat, 4 Sep 2021 11:09:21 GMT Subject: RFR: 8268084: [macos] Disabled JMenuItem arrow is not disabled [v2] In-Reply-To: References: Message-ID: On Fri, 3 Sep 2021 05:54:45 GMT, Sergey Bylokhov wrote: >> I will like to know how because as it is pointed out, paintArrow delegates drawing to ImageIcon#paintIcon which is in shared code and this is mac specific issue so it needs to be handled before we call ImageIcon#paintIcon > > You need to override the paintIcon method in the InvertableImageIcon returned by the AquaImageFactory.getMenuArrowIcon() or you can create `class MenuArrowIcon extends InvertableImageIcon,` and override it there. > > Also take a look to another usage of InvertableImageIcon for "MenuItemCheckIcon", should we disable it as well? MenuItemCheckIcon disable-ness is also solved along with this fix. JCheckBoxMenuItem component for MenuItemCheckIcon test is added additionally. ------------- PR: https://git.openjdk.java.net/jdk/pull/5310 From psadhukhan at openjdk.java.net Sat Sep 4 11:09:50 2021 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Sat, 4 Sep 2021 11:09:50 GMT Subject: Integrated: 8272232: javax/swing/JTable/4275046/bug4275046.java failed with "Expected value in the cell: 'rededited' but found 'redEDITED'." In-Reply-To: References: Message-ID: On Wed, 11 Aug 2021 09:03:57 GMT, Prasanta Sadhukhan wrote: > The test fails in CI testing citing expected "rededited" but found "redEDITED", which seems to point to fact that either there is a CAPS_LOCK key switched on or some other test did not use SHIFT key corectly ie, pressed but not released. > > Considering many more tests would have failed if CAPS_LOCK is turned on, I tried to find if some tests uses SHIFT key mistakenly and it seems JRadioButton test has press/release order wrong and it uses SHIFT. Rectified that. > > In addition, corrected some known CI issues ie waiting after frame is made visible, made frame to centre. Along with that, also modified testcase to check lowercase string. Since the original JDK-4275046 issue is about newly entered text is made part of cell or not, it does not matter if it's in lowercase/uppercase and if such CAPS_LOCK or Shift key problem happens again, this test will not be affected. > > CI run for several iterations running these 2 tests one after another in all platforms is green. This pull request has now been integrated. Changeset: cec6c068 Author: Prasanta Sadhukhan URL: https://git.openjdk.java.net/jdk/commit/cec6c068b03d890312e50b448fbc26102c635249 Stats: 21 lines in 5 files changed: 12 ins; 7 del; 2 mod 8272232: javax/swing/JTable/4275046/bug4275046.java failed with "Expected value in the cell: 'rededited' but found 'redEDITED'." 8257540: javax/swing/JFileChooser/8041694/bug8041694.java failed with "RuntimeException: The selected directory name is not the expected 'd ' but 'D '." Reviewed-by: serb ------------- PR: https://git.openjdk.java.net/jdk/pull/5079 From pbansal at openjdk.java.net Sat Sep 4 13:04:48 2021 From: pbansal at openjdk.java.net (Pankaj Bansal) Date: Sat, 4 Sep 2021 13:04:48 GMT Subject: RFR: 8272148: JDesktopPane:getComponentCount() returns one extra than expected with GTKLookAndFeel [v2] In-Reply-To: References: Message-ID: On Mon, 23 Aug 2021 17:05:25 GMT, Phil Race wrote: >> Pankaj Bansal has updated the pull request incrementally with one additional commit since the last revision: >> >> Review Comments > >> > I wonder how the other components handle that. For example, the JComboBox in Aqua L&F is a "compound" element and it contains a text field and button, what does the "getComponentCount" return in that case, wIll we hide internal data from the user? >> >> I just ran the following test for JComboBox for all L&Fs on my Mac. It fails for everyone of them. The test and output is as below. Looks like this test is not being run for all components for all L&Fs. It should give lot of failures I guess. > > Yep not unexpected which is why I said this needed to be documented at least as high up as JComponent. > And FWIW since nothing said that JComponents are created with no children it is a very weak bug/complaint to begin with ! Gentle Reminder to the reviewers @prrace @mrserb ------------- PR: https://git.openjdk.java.net/jdk/pull/5121 From prr at openjdk.java.net Sat Sep 4 18:23:49 2021 From: prr at openjdk.java.net (Phil Race) Date: Sat, 4 Sep 2021 18:23:49 GMT Subject: RFR: 8272148: JDesktopPane:getComponentCount() returns one extra than expected with GTKLookAndFeel [v2] In-Reply-To: References: Message-ID: On Wed, 25 Aug 2021 10:39:42 GMT, Pankaj Bansal wrote: >> A container may include few default components as children, which are added to it during creation. Due to this, calling function getChildrenCount on a new created instance may return non zero value. This behaviour may vary according to L&F also, as some L&F may add some default components to a container, but other L&F may choose not to do so. >> >> The current bugs reports that this behaviour looks suspicious as it is expected that a newly created container will have zero children. >> >> Current specification is not clear on this whether it is allowed for a container to contain default components or not. The fix make changes to the specification to clarify the same. >> >> Note: I think this will need a CSR, I will file one after the review is completed > > Pankaj Bansal has updated the pull request incrementally with one additional commit since the last revision: > > Review Comments Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5121 From pbansal at openjdk.java.net Sat Sep 4 19:48:47 2021 From: pbansal at openjdk.java.net (Pankaj Bansal) Date: Sat, 4 Sep 2021 19:48:47 GMT Subject: RFR: 8272148: JDesktopPane:getComponentCount() returns one extra than expected with GTKLookAndFeel [v2] In-Reply-To: References: Message-ID: On Wed, 25 Aug 2021 10:39:42 GMT, Pankaj Bansal wrote: >> A container may include few default components as children, which are added to it during creation. Due to this, calling function getChildrenCount on a new created instance may return non zero value. This behaviour may vary according to L&F also, as some L&F may add some default components to a container, but other L&F may choose not to do so. >> >> The current bugs reports that this behaviour looks suspicious as it is expected that a newly created container will have zero children. >> >> Current specification is not clear on this whether it is allowed for a container to contain default components or not. The fix make changes to the specification to clarify the same. >> >> Note: I think this will need a CSR, I will file one after the review is completed > > Pankaj Bansal has updated the pull request incrementally with one additional commit since the last revision: > > Review Comments The CSR is created for this issue https://bugs.openjdk.java.net/browse/JDK-8273356 ------------- PR: https://git.openjdk.java.net/jdk/pull/5121 From serb at openjdk.java.net Sun Sep 5 08:19:05 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Sun, 5 Sep 2021 08:19:05 GMT Subject: RFR: 8272148: JDesktopPane:getComponentCount() returns one extra than expected with GTKLookAndFeel [v2] In-Reply-To: References: Message-ID: On Wed, 25 Aug 2021 10:39:42 GMT, Pankaj Bansal wrote: >> A container may include few default components as children, which are added to it during creation. Due to this, calling function getChildrenCount on a new created instance may return non zero value. This behaviour may vary according to L&F also, as some L&F may add some default components to a container, but other L&F may choose not to do so. >> >> The current bugs reports that this behaviour looks suspicious as it is expected that a newly created container will have zero children. >> >> Current specification is not clear on this whether it is allowed for a container to contain default components or not. The fix make changes to the specification to clarify the same. >> >> Note: I think this will need a CSR, I will file one after the review is completed > > Pankaj Bansal has updated the pull request incrementally with one additional commit since the last revision: > > Review Comments Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5121 From jdv at openjdk.java.net Mon Sep 6 06:24:45 2021 From: jdv at openjdk.java.net (Jayathirth D V) Date: Mon, 6 Sep 2021 06:24:45 GMT Subject: RFR: 8271923: [macos] the text color on the selected disabled tabbed pane button remains white making text unreadable In-Reply-To: References: Message-ID: <1VDfoUFS-a2aqEVj01KHTBBgR50vInDG994_hUSxBYY=.b3f6b751-60f7-4a3b-b1b9-961fd2dc6558@github.com> On Mon, 23 Aug 2021 12:32:20 GMT, Prasanta Sadhukhan wrote: > It is seen that if a JTabbedPane is unfocused, it's title is painted with **white** text on grey background > as opposed to **black** text on grey background in unfoucsed native app on macOSX Catalina > and is somewhat not legible. > This can be seen with SwingSet2 demo with InternalFrame or JTabbedPane demo and any native app, making focus toggle between the two. > > Issue was TabbedPane always draw with "selectedTabTitleNormalColor" which is white. Although Aqua L&F defined selectedTabTitleDisabledColor but it is not used as TabbedPane does not check if focus is there in current frame and draw accordingly, which native app does. > > Proposed fix is to check for frame is active or not and draw text color accordingly. > Since it is not affecting BigSur (where even if native app active or not text is always drawn in same color), it is only restricted to Catalina and lower. src/java.desktop/macosx/classes/com/apple/laf/AquaTabbedPaneContrastUI.java line 83: > 81: if (enabled && pressed) { > 82: return UIManager.getColor("TabbedPane.selectedTabTitlePressedColor"); > 83: } else if (!enabled || (!JRSUIUtils.isMacOSXBigSurOrAbove() && !isFrameActive)) { Do we enter this condition in BigSur when SwingSet2 is not focused? If yes, Will we not see difference in color between "new ColorUIResource(new Color(1, 1, 1, 0.55f))" and updated "black" color ? If no, In BigSur from where black color is picked for selectedTabTitleDisabledColor? ------------- PR: https://git.openjdk.java.net/jdk/pull/5217 From jdv at openjdk.java.net Mon Sep 6 07:25:14 2021 From: jdv at openjdk.java.net (Jayathirth D V) Date: Mon, 6 Sep 2021 07:25:14 GMT Subject: RFR: 8271923: [macos] the text color on the selected disabled tabbed pane button remains white making text unreadable In-Reply-To: References: Message-ID: On Mon, 23 Aug 2021 12:32:20 GMT, Prasanta Sadhukhan wrote: > It is seen that if a JTabbedPane is unfocused, it's title is painted with **white** text on grey background > as opposed to **black** text on grey background in unfoucsed native app on macOSX Catalina > and is somewhat not legible. > This can be seen with SwingSet2 demo with InternalFrame or JTabbedPane demo and any native app, making focus toggle between the two. > > Issue was TabbedPane always draw with "selectedTabTitleNormalColor" which is white. Although Aqua L&F defined selectedTabTitleDisabledColor but it is not used as TabbedPane does not check if focus is there in current frame and draw accordingly, which native app does. > > Proposed fix is to check for frame is active or not and draw text color accordingly. > Since it is not affecting BigSur (where even if native app active or not text is always drawn in same color), it is only restricted to Catalina and lower. Code change looks good to me. Any reason why we dont have regression test for this change? I think we can add simple TabbedPane scenario for non BigSur use case and read pixel data. Also there is no "noreg-*" label in JBS. ------------- PR: https://git.openjdk.java.net/jdk/pull/5217 From psadhukhan at openjdk.java.net Mon Sep 6 09:07:42 2021 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 6 Sep 2021 09:07:42 GMT Subject: RFR: 8271923: [macos] the text color on the selected disabled tabbed pane button remains white making text unreadable [v2] In-Reply-To: References: Message-ID: On Mon, 6 Sep 2021 08:00:36 GMT, Prasanta Sadhukhan wrote: >> It is seen that if a JTabbedPane is unfocused, it's title is painted with **white** text on grey background >> as opposed to **black** text on grey background in unfoucsed native app on macOSX Catalina >> and is somewhat not legible. >> This can be seen with SwingSet2 demo with InternalFrame or JTabbedPane demo and any native app, making focus toggle between the two. >> >> Issue was TabbedPane always draw with "selectedTabTitleNormalColor" which is white. Although Aqua L&F defined selectedTabTitleDisabledColor but it is not used as TabbedPane does not check if focus is there in current frame and draw accordingly, which native app does. >> >> Proposed fix is to check for frame is active or not and draw text color accordingly. >> Since it is not affecting BigSur (where even if native app active or not text is always drawn in same color), it is only restricted to Catalina and lower. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Use NonFocus color It will be difficult to prove the issue for text color as robot will pick the pixels for tabbedpane along with background, not only text. Also, it's not for all macos, it's only for Catalina...we don't have requires tag to omit specific macos.. ------------- PR: https://git.openjdk.java.net/jdk/pull/5217 From jdv at openjdk.java.net Mon Sep 6 09:20:02 2021 From: jdv at openjdk.java.net (Jayathirth D V) Date: Mon, 6 Sep 2021 09:20:02 GMT Subject: RFR: 8273375: Remove redundant 'new String' calls after concatenation in java.desktop In-Reply-To: References: Message-ID: On Fri, 3 Sep 2021 07:53:21 GMT, Andrey Turbanov wrote: > Result of string concatenation is a newly created `String` object. There is no need it wrap it in another `new String` call. > Such calls are confusing and produce warnings in IDE. Without them code is easier to read. Link this PR to bug in JBS. Otherwise change looks fine. ------------- PR: https://git.openjdk.java.net/jdk/pull/5356 From github.com+741251+turbanoff at openjdk.java.net Mon Sep 6 09:20:01 2021 From: github.com+741251+turbanoff at openjdk.java.net (Andrey Turbanov) Date: Mon, 6 Sep 2021 09:20:01 GMT Subject: RFR: 8273375: Remove redundant 'new String' calls after concatenation in java.desktop Message-ID: Result of string concatenation is a newly created `String` object. There is no need it wrap it in another `new String` call. Such calls are confusing and produce warnings in IDE. Without them code is easier to read. ------------- Commit messages: - [PATCH] Remove redundant 'new String' calls after concatenation in java.desktop Changes: https://git.openjdk.java.net/jdk/pull/5356/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5356&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273375 Stats: 91 lines in 15 files changed: 8 ins; 2 del; 81 mod Patch: https://git.openjdk.java.net/jdk/pull/5356.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5356/head:pull/5356 PR: https://git.openjdk.java.net/jdk/pull/5356 From github.com+72060147+amresh-sahu at openjdk.java.net Mon Sep 6 11:43:51 2021 From: github.com+72060147+amresh-sahu at openjdk.java.net (Amresh Sahu) Date: Mon, 6 Sep 2021 11:43:51 GMT Subject: RFR: JDK-8273312 : [TESTBUG] sanity/client/SwingSet/src/ButtonDemoScreenshotTest.java fails intermittently on Windows OS. Message-ID: Problem: In Windows look and feel, Button(in test case ui) starts animating to show the selection and test case captures the animated button image to do the comparisons with initial button image and this comparison fails with Timeout Exception exception. Solution: TestHelper class provides the list of look and feel. One more method added to this class to exclude the windows look and feel. This test has been tested 20 times on mach5 and It is passing. ------------- Commit messages: - JDK-8273312 : sanity/client/SwingSet/src/ButtonDemoScreenshotTest.java fails intermittently on Windows OS. - Merge pull request #5 from openjdk/master - Merge pull request #4 from openjdk/master - Merge pull request #3 from openjdk/master - Merge pull request #2 from openjdk/master Changes: https://git.openjdk.java.net/jdk/pull/5380/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5380&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273312 Stats: 17 lines in 2 files changed: 16 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/5380.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5380/head:pull/5380 PR: https://git.openjdk.java.net/jdk/pull/5380 From github.com+72060147+amresh-sahu at openjdk.java.net Mon Sep 6 11:43:51 2021 From: github.com+72060147+amresh-sahu at openjdk.java.net (Amresh Sahu) Date: Mon, 6 Sep 2021 11:43:51 GMT Subject: RFR: JDK-8273312 : [TESTBUG] sanity/client/SwingSet/src/ButtonDemoScreenshotTest.java fails intermittently on Windows OS. In-Reply-To: References: Message-ID: On Mon, 6 Sep 2021 11:35:05 GMT, Amresh Sahu wrote: > Problem: In Windows look and feel, Button(in test case ui) starts animating to show the selection and test case captures the animated button image to do the comparisons with initial button image and this comparison fails with Timeout Exception exception. > > Solution: TestHelper class provides the list of look and feel. One more method added to this class to exclude the windows look and feel. > > This test has been tested 20 times on mach5 and It is passing. @shurymury @lawrence-andrew Kindly review my changes. ------------- PR: https://git.openjdk.java.net/jdk/pull/5380 From pbansal at openjdk.java.net Mon Sep 6 13:58:38 2021 From: pbansal at openjdk.java.net (Pankaj Bansal) Date: Mon, 6 Sep 2021 13:58:38 GMT Subject: RFR: JDK-8273312 : [TESTBUG] sanity/client/SwingSet/src/ButtonDemoScreenshotTest.java fails intermittently on Windows OS. In-Reply-To: References: Message-ID: On Mon, 6 Sep 2021 11:35:05 GMT, Amresh Sahu wrote: > Problem: In Windows look and feel, Button(in test case ui) starts animating to show the selection and test case captures the animated button image to do the comparisons with initial button image and this comparison fails with Timeout Exception exception. > > Solution: TestHelper class provides the list of look and feel. One more method added to this class to exclude the windows look and feel. > > This test has been tested 20 times on mach5 and It is passing. Is there a specific reason why this comparison only times out for windows L&F and the test passes on other L&Fs. I mean should not a bug be filled to investigate the reason for the same instead of excluding the Windows L&F from the tested L&Fs. ------------- PR: https://git.openjdk.java.net/jdk/pull/5380 From serb at openjdk.java.net Mon Sep 6 21:16:39 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 6 Sep 2021 21:16:39 GMT Subject: RFR: JDK-8273312 : [TESTBUG] sanity/client/SwingSet/src/ButtonDemoScreenshotTest.java fails intermittently on Windows OS. In-Reply-To: References: Message-ID: On Mon, 6 Sep 2021 11:35:05 GMT, Amresh Sahu wrote: > Problem: In Windows look and feel, Button(in test case ui) starts animating to show the selection and test case captures the animated button image to do the comparisons with initial button image and this comparison fails with Timeout Exception exception. > > Solution: TestHelper class provides the list of look and feel. One more method added to this class to exclude the windows look and feel. > > This test has been tested 20 times on mach5 and It is passing. This animation was disabled by the JDK-8222519, does it meant that "-Dswing.disablevistaanimation=true" is broken? ------------- PR: https://git.openjdk.java.net/jdk/pull/5380 From github.com+72060147+amresh-sahu at openjdk.java.net Tue Sep 7 03:53:39 2021 From: github.com+72060147+amresh-sahu at openjdk.java.net (Amresh Sahu) Date: Tue, 7 Sep 2021 03:53:39 GMT Subject: Withdrawn: JDK-8273312 : [TESTBUG] sanity/client/SwingSet/src/ButtonDemoScreenshotTest.java fails intermittently on Windows OS. In-Reply-To: References: Message-ID: <4xhuOjgpVpH7FLp8hG0uEv6BygP72KM6aKI9pROZo0s=.7e7063eb-5e35-49f3-8d4e-2988ce2681ae@github.com> On Mon, 6 Sep 2021 11:35:05 GMT, Amresh Sahu wrote: > Problem: In Windows look and feel, Button(in test case ui) starts animating to show the selection and test case captures the animated button image to do the comparisons with initial button image and this comparison fails with Timeout Exception exception. > > Solution: TestHelper class provides the list of look and feel. One more method added to this class to exclude the windows look and feel. > > This test has been tested 20 times on mach5 and It is passing. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.java.net/jdk/pull/5380 From github.com+72060147+amresh-sahu at openjdk.java.net Tue Sep 7 05:03:40 2021 From: github.com+72060147+amresh-sahu at openjdk.java.net (Amresh Sahu) Date: Tue, 7 Sep 2021 05:03:40 GMT Subject: RFR: JDK-8273312 : [TESTBUG] sanity/client/SwingSet/src/ButtonDemoScreenshotTest.java fails intermittently on Windows OS. In-Reply-To: References: Message-ID: On Mon, 6 Sep 2021 21:13:51 GMT, Sergey Bylokhov wrote: >> Problem: In Windows look and feel, Button(in test case ui) starts animating to show the selection and test case captures the animated button image to do the comparisons with initial button image and this comparison fails with Timeout Exception exception. >> >> Solution: TestHelper class provides the list of look and feel. One more method added to this class to exclude the windows look and feel. >> >> This test has been tested 20 times on mach5 and It is passing. > > This animation was disabled by the JDK-8222519, does it meant that "-Dswing.disablevistaanimation=true" is broken? Thanks @mrserb. Test case passes with -Dswing.disablevistaanimation=true so closed the pull request. ------------- PR: https://git.openjdk.java.net/jdk/pull/5380 From psadhukhan at openjdk.java.net Tue Sep 7 11:25:36 2021 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 7 Sep 2021 11:25:36 GMT Subject: RFR: 8268084: [macos] Disabled JMenuItem arrow is not disabled [v2] In-Reply-To: References: Message-ID: On Sat, 4 Sep 2021 11:06:14 GMT, Prasanta Sadhukhan wrote: >> You need to override the paintIcon method in the InvertableImageIcon returned by the AquaImageFactory.getMenuArrowIcon() or you can create `class MenuArrowIcon extends InvertableImageIcon,` and override it there. >> >> Also take a look to another usage of InvertableImageIcon for "MenuItemCheckIcon", should we disable it as well? > > MenuItemCheckIcon disable-ness is also solved along with this fix. > JCheckBoxMenuItem component for MenuItemCheckIcon test is added additionally. Any more comments on this? ------------- PR: https://git.openjdk.java.net/jdk/pull/5310 From jdv at openjdk.java.net Tue Sep 7 13:48:37 2021 From: jdv at openjdk.java.net (Jayathirth D V) Date: Tue, 7 Sep 2021 13:48:37 GMT Subject: RFR: 8271923: [macos] the text color on the selected disabled tabbed pane button remains white making text unreadable [v2] In-Reply-To: References: Message-ID: On Mon, 6 Sep 2021 08:00:36 GMT, Prasanta Sadhukhan wrote: >> It is seen that if a JTabbedPane is unfocused, it's title is painted with **white** text on grey background >> as opposed to **black** text on grey background in unfoucsed native app on macOSX Catalina >> and is somewhat not legible. >> This can be seen with SwingSet2 demo with InternalFrame or JTabbedPane demo and any native app, making focus toggle between the two. >> >> Issue was TabbedPane always draw with "selectedTabTitleNormalColor" which is white. Although Aqua L&F defined selectedTabTitleDisabledColor but it is not used as TabbedPane does not check if focus is there in current frame and draw accordingly, which native app does. >> >> Proposed fix is to check for frame is active or not and draw text color accordingly. >> Since it is not affecting BigSur (where even if native app active or not text is always drawn in same color), it is only restricted to Catalina and lower. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Use NonFocus color Marked as reviewed by jdv (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5217 From psadhukhan at openjdk.java.net Tue Sep 7 15:54:39 2021 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 7 Sep 2021 15:54:39 GMT Subject: Integrated: 8271923: [macos] the text color on the selected disabled tabbed pane button remains white making text unreadable In-Reply-To: References: Message-ID: On Mon, 23 Aug 2021 12:32:20 GMT, Prasanta Sadhukhan wrote: > It is seen that if a JTabbedPane is unfocused, it's title is painted with **white** text on grey background > as opposed to **black** text on grey background in unfoucsed native app on macOSX Catalina > and is somewhat not legible. > This can be seen with SwingSet2 demo with InternalFrame or JTabbedPane demo and any native app, making focus toggle between the two. > > Issue was TabbedPane always draw with "selectedTabTitleNormalColor" which is white. Although Aqua L&F defined selectedTabTitleDisabledColor but it is not used as TabbedPane does not check if focus is there in current frame and draw accordingly, which native app does. > > Proposed fix is to check for frame is active or not and draw text color accordingly. > Since it is not affecting BigSur (where even if native app active or not text is always drawn in same color), it is only restricted to Catalina and lower. This pull request has now been integrated. Changeset: df05b4d1 Author: Prasanta Sadhukhan URL: https://git.openjdk.java.net/jdk/commit/df05b4d1a13e55755107695ad9ea7a8a1084901a Stats: 9 lines in 2 files changed: 8 ins; 0 del; 1 mod 8271923: [macos] the text color on the selected disabled tabbed pane button remains white making text unreadable Reviewed-by: jdv ------------- PR: https://git.openjdk.java.net/jdk/pull/5217 From aivanov at openjdk.java.net Tue Sep 7 19:08:40 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 7 Sep 2021 19:08:40 GMT Subject: Integrated: 8273043: [TEST_BUG] Automate NimbusJTreeSelTextColor.java In-Reply-To: <_106A4do7gAjpYA6dBKdawZoC912qVdEiPNn3fRhG1M=.effe33ed-0e83-44b0-b047-5d4d7ad5dc3d@github.com> References: <_106A4do7gAjpYA6dBKdawZoC912qVdEiPNn3fRhG1M=.effe33ed-0e83-44b0-b047-5d4d7ad5dc3d@github.com> Message-ID: On Thu, 26 Aug 2021 19:21:13 GMT, Alexey Ivanov wrote: > Automated NimbusJTreeSelTextColor.java test which is added under [JDK-8271315](https://bugs.openjdk.java.net/browse/JDK-8271315). > > It passes with the recent build of JDK 18. > It fails with JDK 18 build 7 where [JDK-8266510](https://bugs.openjdk.java.net/browse/JDK-8266510) is not fixed yet: > > > Exception in thread "main" java.lang.RuntimeException: Unexpected color found: ff000000 at (4, 9); > foreground: ffffffff; background: ff39698a - check image.png > at NimbusJTreeSelTextColor.checkColors(NimbusJTreeSelTextColor.java:106) > at NimbusJTreeSelTextColor.main(NimbusJTreeSelTextColor.java:70) > > > The line is wrapped for readability. In this case the text is black instead of white. This pull request has now been integrated. Changeset: 270a9d92 Author: Alexey Ivanov URL: https://git.openjdk.java.net/jdk/commit/270a9d929307dce52e6961e57492c03a633ed044 Stats: 144 lines in 1 file changed: 43 ins; 53 del; 48 mod 8273043: [TEST_BUG] Automate NimbusJTreeSelTextColor.java Reviewed-by: serb ------------- PR: https://git.openjdk.java.net/jdk/pull/5269 From philip.race at oracle.com Wed Sep 15 18:09:13 2021 From: philip.race at oracle.com (Philip Race) Date: Wed, 15 Sep 2021 11:09:13 -0700 Subject: Retiring this swing-dev list on 30th September 2021 In-Reply-To: References: Message-ID: <482d3e13-71a0-13ac-8be2-f5d67b760b85@oracle.com> As described below -Phil. -------- Forwarded Message -------- Subject: Retiring 2d, awt, beans, sound and swing mailing lists on 30th September 2021 Date: Wed, 15 Sep 2021 11:05:09 -0700 From: Philip Race To: client-libs-dev at openjdk.java.net Since : 1) The old client groups mailing lists were consolidated into client-libs-dev at openjdk dot java dot net [1], including subscribing all subscribers to the old invividual lists to the new consolidated list, and 2) The skara github tooling has also migrated to that new list and 3) Folks are already using the new list for questions etc Then : I think it is time to plan the retirement of all the old lists : 2d-dev [2], awt-dev [3], beans-dev [4], sound-dev [5], and swing-dev [6] Accordingly I propose that these five old lists become archived and read-only as of 12pm PDT 30th September 2021 and will ask the mail server adminstrators to plan to implement this at that time. I will also forward this information to each of those individual lists. -Phil Race Client Libs Group Lead. [1] https://mail.openjdk.java.net/mailman/listinfo/client-libs-dev [2] https://mail.openjdk.java.net/mailman/listinfo/2d-dev [3] https://mail.openjdk.java.net/mailman/listinfo/awt-dev [4] https://mail.openjdk.java.net/mailman/listinfo/beans-dev [5] https://mail.openjdk.java.net/mailman/listinfo/sound-dev [6] https://mail.openjdk.java.net/mailman/listinfo/swing-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: From mwallace at ccmtrading.com Tue Sep 28 15:40:10 2021 From: mwallace at ccmtrading.com (Matthew Wallace) Date: Tue, 28 Sep 2021 10:40:10 -0500 Subject: HiDPI Fractional Scaling on GTK Message-ID: I'd like to use fractional scaling in my swing application on Linux (GTK). My application already works perfectly with fractional scaling on Windows but on Linux only integer values are supported. Could anyone familiar with this outline for me the work needed to support fractional scaling on Linux? I'm willing to do some hacking to make this work, but I really have no idea where to start or if it's even feasible. Any help is greatly appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: From philip.race at oracle.com Wed Sep 29 04:03:12 2021 From: philip.race at oracle.com (Philip Race) Date: Tue, 28 Sep 2021 21:03:12 -0700 Subject: Retiring this swing-dev list on 30th September 2021 In-Reply-To: <482d3e13-71a0-13ac-8be2-f5d67b760b85@oracle.com> References: <482d3e13-71a0-13ac-8be2-f5d67b760b85@oracle.com> Message-ID: <5555749d-ad74-c454-1840-19f00c113f7a@oracle.com> Reminder. -phil. On 9/15/21 11:09 AM, Philip Race wrote: > As described below > > -Phil. > > -------- Forwarded Message -------- > Subject: Retiring 2d, awt, beans, sound and swing mailing lists on > 30th September 2021 > Date: Wed, 15 Sep 2021 11:05:09 -0700 > From: Philip Race > To: client-libs-dev at openjdk.java.net > > > > Since : > 1) The old client groups mailing lists were consolidated into > client-libs-dev at openjdk dot java dot net [1], > including subscribing all subscribers to the old invividual lists to > the new consolidated list, and > 2) The skara github tooling has also migrated to that new list and > 3) Folks are already using the new list for questions etc > > Then : > I think it is time to plan the retirement of all the old lists : > 2d-dev [2], awt-dev [3], beans-dev [4], sound-dev [5], and swing-dev [6] > > Accordingly I propose that these five old lists become archived and > read-only as of 12pm PDT 30th September 2021 > and will ask the mail server adminstrators to plan to implement this > at that time. > > I will also forward this information to each of those individual lists. > > -Phil Race > Client Libs Group Lead. > > [1] https://mail.openjdk.java.net/mailman/listinfo/client-libs-dev > [2] https://mail.openjdk.java.net/mailman/listinfo/2d-dev > [3] https://mail.openjdk.java.net/mailman/listinfo/awt-dev > [4] https://mail.openjdk.java.net/mailman/listinfo/beans-dev > [5] https://mail.openjdk.java.net/mailman/listinfo/sound-dev > [6] https://mail.openjdk.java.net/mailman/listinfo/swing-dev > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: