You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexey A. Ivanov (JIRA)" <ji...@apache.org> on 2006/12/14 16:25:21 UTC
[jira] Created: (HARMONY-2711) [classlib][swing] j.s.JColorChooser
should use "ColorChooser.swatchesDefaultRecentColor" L&F key
[classlib][swing] j.s.JColorChooser should use "ColorChooser.swatchesDefaultRecentColor" L&F key
------------------------------------------------------------------------------------------------
Key: HARMONY-2711
URL: http://issues.apache.org/jira/browse/HARMONY-2711
Project: Harmony
Issue Type: Bug
Components: Classlib
Reporter: Alexey A. Ivanov
Priority: Minor
"ColorChooser.swatchesDefaultRecentColor" L&F key defines which color is displayed in Recent swatches of JColorChooser.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HARMONY-2711) [classlib][swing]
j.s.JColorChooser should use "ColorChooser.swatchesDefaultRecentColor" L&F
key
Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2711?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12463593 ]
Vasily Zakharov commented on HARMONY-2711:
------------------------------------------
I'll look into this issue.
> [classlib][swing] j.s.JColorChooser should use "ColorChooser.swatchesDefaultRecentColor" L&F key
> ------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2711
> URL: https://issues.apache.org/jira/browse/HARMONY-2711
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Priority: Minor
> Attachments: H2711-Harmony.png, H2711-RI.png, HTest2711.java
>
>
> "ColorChooser.swatchesDefaultRecentColor" L&F key defines which color is displayed in Recent swatches of JColorChooser.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (HARMONY-2711) [classlib][swing] j.s.JColorChooser
should use "ColorChooser.swatchesDefaultRecentColor" L&F key
Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2711?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey A. Ivanov updated HARMONY-2711:
--------------------------------------
Attachment: H2711-j.s.colorchooser.SwatchesPanel.patch
The patch fixes the issue: I've just filled the underlying array of colors with the Color set with "ColorChooser.swatchesDefaultRecentColor" property.
Remove the line with
JDialog.setDefaultLookAndFeelDecorated(true);
from the sample application to be able to run it while HARMONY-3016 is not fixed.
To check that the Recent color swatches are filled with black color, put for example new Object() as the value for "ColorChooser.swatchesDefaultRecentColor".
> [classlib][swing] j.s.JColorChooser should use "ColorChooser.swatchesDefaultRecentColor" L&F key
> ------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2711
> URL: https://issues.apache.org/jira/browse/HARMONY-2711
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Priority: Minor
> Attachments: H2711-Harmony.png, H2711-j.s.colorchooser.SwatchesPanel.patch, H2711-RI.png, HTest2711.java
>
>
> "ColorChooser.swatchesDefaultRecentColor" L&F key defines which color is displayed in Recent swatches of JColorChooser.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-2711) [classlib][swing] j.s.JColorChooser
should use "ColorChooser.swatchesDefaultRecentColor" L&F key
Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2711?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey A. Ivanov updated HARMONY-2711:
--------------------------------------
Estimated Complexity: Moderate
Patch Info: [Patch Available]
> [classlib][swing] j.s.JColorChooser should use "ColorChooser.swatchesDefaultRecentColor" L&F key
> ------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2711
> URL: https://issues.apache.org/jira/browse/HARMONY-2711
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Priority: Minor
> Attachments: H2711-Harmony.png, H2711-j.s.colorchooser.SwatchesPanel.patch, H2711-RI.png, HTest2711.java
>
>
> "ColorChooser.swatchesDefaultRecentColor" L&F key defines which color is displayed in Recent swatches of JColorChooser.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-2711) [classlib][swing] j.s.JColorChooser
should use "ColorChooser.swatchesDefaultRecentColor" L&F key
Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2711?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey A. Ivanov updated HARMONY-2711:
--------------------------------------
Attachment: H2711-j.s.colorchooser.SwatchesPanel.patch
Fixed typo in the previous patch.
> [classlib][swing] j.s.JColorChooser should use "ColorChooser.swatchesDefaultRecentColor" L&F key
> ------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2711
> URL: https://issues.apache.org/jira/browse/HARMONY-2711
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Priority: Minor
> Attachments: H2711-Harmony.png, H2711-j.s.colorchooser.SwatchesPanel.patch, H2711-j.s.colorchooser.SwatchesPanel.patch, H2711-RI.png, HTest2711.java
>
>
> "ColorChooser.swatchesDefaultRecentColor" L&F key defines which color is displayed in Recent swatches of JColorChooser.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (HARMONY-2711) [classlib][swing] j.s.JColorChooser
should use "ColorChooser.swatchesDefaultRecentColor" L&F key
Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2711?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey A. Ivanov closed HARMONY-2711.
-------------------------------------
Yep, that's better. Thank you.
Everything works as expected.
> [classlib][swing] j.s.JColorChooser should use "ColorChooser.swatchesDefaultRecentColor" L&F key
> ------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2711
> URL: https://issues.apache.org/jira/browse/HARMONY-2711
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Assigned To: Alexey Petrenko
> Priority: Minor
> Attachments: H2711-Harmony.png, H2711-j.s.colorchooser.SwatchesPanel.patch, H2711-j.s.colorchooser.SwatchesPanel.patch, H2711-RI.png, HTest2711.java
>
>
> "ColorChooser.swatchesDefaultRecentColor" L&F key defines which color is displayed in Recent swatches of JColorChooser.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-2711) [classlib][swing]
j.s.JColorChooser should use "ColorChooser.swatchesDefaultRecentColor" L&F
key
Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2711?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465478 ]
Vasily Zakharov commented on HARMONY-2711:
------------------------------------------
I couldn't find a reasonable way to fix this issue.
I'm giving it up for now hoping someone confident in Swing would look into it.
> [classlib][swing] j.s.JColorChooser should use "ColorChooser.swatchesDefaultRecentColor" L&F key
> ------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2711
> URL: https://issues.apache.org/jira/browse/HARMONY-2711
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Priority: Minor
> Attachments: H2711-Harmony.png, H2711-RI.png, HTest2711.java
>
>
> "ColorChooser.swatchesDefaultRecentColor" L&F key defines which color is displayed in Recent swatches of JColorChooser.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (HARMONY-2711) [classlib][swing] j.s.JColorChooser
should use "ColorChooser.swatchesDefaultRecentColor" L&F key
Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2711?page=all ]
Alexey A. Ivanov updated HARMONY-2711:
--------------------------------------
Attachment: H2711-Harmony.png
H2711-RI.png
HTest2711.java
HTest2711.java is demo application which demonstrates the problem.
Images are are screen shot of JColorChooser. Note all the colors in Recent area of the color chooser are greenish on RI whereas they are gray on Harmony.
> [classlib][swing] j.s.JColorChooser should use "ColorChooser.swatchesDefaultRecentColor" L&F key
> ------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2711
> URL: http://issues.apache.org/jira/browse/HARMONY-2711
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Priority: Minor
> Attachments: H2711-Harmony.png, H2711-RI.png, HTest2711.java
>
>
> "ColorChooser.swatchesDefaultRecentColor" L&F key defines which color is displayed in Recent swatches of JColorChooser.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (HARMONY-2711) [classlib][swing] j.s.JColorChooser
should use "ColorChooser.swatchesDefaultRecentColor" L&F key
Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2711?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey A. Ivanov updated HARMONY-2711:
--------------------------------------
Attachment: HTest2711.java
The updated version of the test application. It includes System.exit() at its ends and doesn't require anyone to manually stop JRE after closing the dialog.
> [classlib][swing] j.s.JColorChooser should use "ColorChooser.swatchesDefaultRecentColor" L&F key
> ------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2711
> URL: https://issues.apache.org/jira/browse/HARMONY-2711
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Assignee: Alexey Petrenko
> Priority: Minor
> Attachments: H2711-Harmony.png, H2711-j.s.colorchooser.SwatchesPanel.patch, H2711-j.s.colorchooser.SwatchesPanel.patch, H2711-RI.png, HTest2711.java, HTest2711.java
>
>
> "ColorChooser.swatchesDefaultRecentColor" L&F key defines which color is displayed in Recent swatches of JColorChooser.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (HARMONY-2711) [classlib][swing] j.s.JColorChooser
should use "ColorChooser.swatchesDefaultRecentColor" L&F key
Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2711?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey Petrenko reassigned HARMONY-2711:
----------------------------------------
Assignee: Alexey Petrenko
> [classlib][swing] j.s.JColorChooser should use "ColorChooser.swatchesDefaultRecentColor" L&F key
> ------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2711
> URL: https://issues.apache.org/jira/browse/HARMONY-2711
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Assigned To: Alexey Petrenko
> Priority: Minor
> Attachments: H2711-Harmony.png, H2711-j.s.colorchooser.SwatchesPanel.patch, H2711-j.s.colorchooser.SwatchesPanel.patch, H2711-RI.png, HTest2711.java
>
>
> "ColorChooser.swatchesDefaultRecentColor" L&F key defines which color is displayed in Recent swatches of JColorChooser.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-2711) [classlib][swing]
j.s.JColorChooser should use "ColorChooser.swatchesDefaultRecentColor" L&F
key
Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2711?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465045 ]
Vasily Zakharov commented on HARMONY-2711:
------------------------------------------
If HARMONY-2666 change is reverted, this program still crashes, with the following stack:
java.lang.NullPointerException
at javax.swing.plaf.metal.MetalRootPaneTitlePane.loadWindowProperties(MetalRootPaneTitlePane.java:329)
at javax.swing.plaf.metal.MetalRootPaneTitlePane.installTitlePane(MetalRootPaneTitlePane.java:23)
at javax.swing.plaf.basic.BasicInternalFrameTitlePane.<init>(BasicInternalFrameTitlePane.java:429)
at javax.swing.plaf.metal.MetalInternalFrameTitlePane.<init>(MetalInternalFrameTitlePane.java:96)
(the rest as above)
> [classlib][swing] j.s.JColorChooser should use "ColorChooser.swatchesDefaultRecentColor" L&F key
> ------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2711
> URL: https://issues.apache.org/jira/browse/HARMONY-2711
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Priority: Minor
> Attachments: H2711-Harmony.png, H2711-RI.png, HTest2711.java
>
>
> "ColorChooser.swatchesDefaultRecentColor" L&F key defines which color is displayed in Recent swatches of JColorChooser.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HARMONY-2711) [classlib][swing]
j.s.JColorChooser should use "ColorChooser.swatchesDefaultRecentColor" L&F
key
Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2711?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12467344 ]
Alexey A. Ivanov commented on HARMONY-2711:
-------------------------------------------
Vasily,
The reason why I used SwingUtilities.invokeLater() rather than just putting all the code in main() function is Swing is *thread-unsafe*.
> [classlib][swing] j.s.JColorChooser should use "ColorChooser.swatchesDefaultRecentColor" L&F key
> ------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2711
> URL: https://issues.apache.org/jira/browse/HARMONY-2711
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Priority: Minor
> Attachments: H2711-Harmony.png, H2711-RI.png, HTest2711.java
>
>
> "ColorChooser.swatchesDefaultRecentColor" L&F key defines which color is displayed in Recent swatches of JColorChooser.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (HARMONY-2711) [classlib][swing] j.s.JColorChooser
should use "ColorChooser.swatchesDefaultRecentColor" L&F key
Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2711?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey Petrenko resolved HARMONY-2711.
--------------------------------------
Resolution: Fixed
Alexey,
I've modified your patch a little.
Arrays.fill should be better from the performance point of view.
Please, verify.
> [classlib][swing] j.s.JColorChooser should use "ColorChooser.swatchesDefaultRecentColor" L&F key
> ------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2711
> URL: https://issues.apache.org/jira/browse/HARMONY-2711
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Assigned To: Alexey Petrenko
> Priority: Minor
> Attachments: H2711-Harmony.png, H2711-j.s.colorchooser.SwatchesPanel.patch, H2711-j.s.colorchooser.SwatchesPanel.patch, H2711-RI.png, HTest2711.java
>
>
> "ColorChooser.swatchesDefaultRecentColor" L&F key defines which color is displayed in Recent swatches of JColorChooser.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-2711) [classlib][swing]
j.s.JColorChooser should use "ColorChooser.swatchesDefaultRecentColor" L&F
key
Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2711?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465031 ]
Vasily Zakharov commented on HARMONY-2711:
------------------------------------------
I couldn't reproduce the issue - the attached program crashes on r496561 with the following exception:
C:\> HarmonyTrunk\working_classlib\deploy\jdk\jre\bin\java HTest2711
java.lang.NullPointerException
at javax.swing.plaf.basic.BasicInternalFrameTitlePane.<init>(BasicInternalFrameTitlePane.java:423)
at javax.swing.plaf.metal.MetalInternalFrameTitlePane.<init>(MetalInternalFrameTitlePane.java:96)
at javax.swing.plaf.metal.MetalRootPaneTitlePane.<init>(MetalRootPaneTitlePane.java:190)
at javax.swing.plaf.metal.MetalRootPaneUI.createTitlePane(MetalRootPaneUI.java:448)
at javax.swing.plaf.metal.MetalRootPaneUI.installWindowDecorations(MetalRootPaneUI.java:393)
at javax.swing.plaf.metal.MetalRootPaneUI.propertyChange(MetalRootPaneUI.java:372)
at java.beans.PropertyChangeSupport.doFirePropertyChange(PropertyChangeSupport.java:342)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:62)
at java.awt.Component.firePropertyChangeImpl(Component.java:1666)
at java.awt.Component.firePropertyChange(Component.java:1670)
at javax.swing.JComponent.firePropertyChange(JComponent.java:56)
at javax.swing.JRootPane.setWindowDecorationStyle(JRootPane.java:229)
at javax.swing.JDialog.dialogInit(JDialog.java:486)
at javax.swing.JDialog.<init>(JDialog.java:93)
at javax.swing.JDialog.<init>(JDialog.java:129)
at javax.swing.JDialog.<init>(JDialog.java:241)
at javax.swing.JColorChooser.createDialog(JColorChooser.java:120)
at javax.swing.JColorChooser.showDialog(JColorChooser.java:15)
at HTest2711$1.run(HTest2711.java:14)
at java.awt.event.InvocationEvent.runAndNotify(InvocationEvent.java:98)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:78)
at java.awt.EventQueueCore.dispatchEventImpl(EventQueueCore.java:138)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:144)
at java.awt.EventDispatchThread.runModalLoop(EventDispatchThread.java:74)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:48)
Looking at the stack, it seems fixing issues HARMONY-2666 caused this problem.
Though it's unclear why frame is null at BasicInternalFrameTitlePane initialization, probably some other issues exist that prevent application from running.
> [classlib][swing] j.s.JColorChooser should use "ColorChooser.swatchesDefaultRecentColor" L&F key
> ------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2711
> URL: https://issues.apache.org/jira/browse/HARMONY-2711
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Priority: Minor
> Attachments: H2711-Harmony.png, H2711-RI.png, HTest2711.java
>
>
> "ColorChooser.swatchesDefaultRecentColor" L&F key defines which color is displayed in Recent swatches of JColorChooser.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HARMONY-2711) [classlib][swing]
j.s.JColorChooser should use "ColorChooser.swatchesDefaultRecentColor" L&F
key
Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2711?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465477 ]
Vasily Zakharov commented on HARMONY-2711:
------------------------------------------
The crash is a separate issue, filed as HARMONY-3016.
For this issue, here's a simpler test that doesn't crash:
import java.awt.Color;
import javax.swing.JColorChooser;
import javax.swing.UIManager;
public class Test {
public static void main(String[] args) {
UIManager.put("ColorChooser.swatchesDefaultRecentColor", new Color(160, 255, 200));
JColorChooser.showDialog(null, "JColorChooser", Color.BLACK);
}
}
> [classlib][swing] j.s.JColorChooser should use "ColorChooser.swatchesDefaultRecentColor" L&F key
> ------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2711
> URL: https://issues.apache.org/jira/browse/HARMONY-2711
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Priority: Minor
> Attachments: H2711-Harmony.png, H2711-RI.png, HTest2711.java
>
>
> "ColorChooser.swatchesDefaultRecentColor" L&F key defines which color is displayed in Recent swatches of JColorChooser.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira