On Fri, 7 Aug 2026 02:30:36 GMT, Prasanta Sadhukhan <[email protected]> wrote:
>> Aqua classes for text components enables dragEnabled by default although >> setDragEnabled spec cites `"The default value of the dragEnabled property is >> false. "` and there is nothing in Aqua L&F that mentions otherwise as to why >> the default is overridden. >> Other L&F dont override the mode and the code is there from macosx port days >> so it seems to be an oversight. >> >> The code is deleted. >> Test is added to check >> - default value is honoured in all installed L&Fs >> - explicit application setting of drag mode is preserved on L&F change >> >> CI testing is ok. >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Prasanta Sadhukhan has updated the pull request incrementally with one > additional commit since the last revision: > > Review comment src/java.desktop/share/classes/javax/swing/JComponent.java line 4200: > 4198: var accessor = SwingAccessor.getJTextComponentAccessor(); > 4199: if (!accessor.isDragEnabledSet(textComponent)) { > 4200: accessor.setDragEnabledUIResource(textComponent, This line may cause undocumented headless exception in public LookAndFeel.installProperty() method? test/jdk/javax/swing/text/JTextComponent/TextComponentDragEnabledTest.java line 94: > 92: for (UIManager.LookAndFeelInfo laf : > 93: UIManager.getInstalledLookAndFeels()) { > 94: UIManager.setLookAndFeel(new MetalLookAndFeel()); Why is it necessary to set new MetalLookAndFeel() here? Is the goal to check the transition from all installed L&Fs one by one, or the transition from MetalLookAndFeel to other L&Fs? It will be good to test serialization patched in the last commit as well. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/32101#discussion_r3738368557 PR Review Comment: https://git.openjdk.org/jdk/pull/32101#discussion_r3738349071
