[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] [FYI] JOptionPane fixes
From: |
Robert Schuster |
Subject: |
[cp-patches] [FYI] JOptionPane fixes |
Date: |
Wed, 14 Sep 2005 01:32:05 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.11) Gecko/20050830 |
Hi,
when using our JOptionPane throught the method
JOptionPane.showConfirmDialog(Component, Object) it did not show a question mark
icon and Yes-No-Cancel buttons like the JDK. This is now fixed.
2005-09-14 Robert Schuster <address@hidden>
* javax/swing/JOptionPane.java:
(showConfirmDialog): Changed QUESTION_MESSAGE like the JDK
does.
* javax/swing/plaf/basic/BasicOptionPaneUI.java:
(getButtons): Treat DEFAULT_OPTION like
YES_NO_CANCEL_OPTION like the JDK.
cu
Robert
Index: javax/swing//JOptionPane.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JOptionPane.java,v
retrieving revision 1.15
diff -u -r1.15 JOptionPane.java
--- javax/swing//JOptionPane.java 21 Jul 2005 11:53:58 -0000 1.15
+++ javax/swing//JOptionPane.java 13 Sep 2005 23:21:08 -0000
@@ -1,5 +1,5 @@
/* JOptionPane.java
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -858,7 +858,7 @@
*/
public static int showConfirmDialog(Component parentComponent, Object
message)
{
- JOptionPane pane = new JOptionPane(message);
+ JOptionPane pane = new JOptionPane(message, QUESTION_MESSAGE);
JDialog dialog = pane.createDialog(parentComponent, "Select an Option");
dialog.pack();
Index: javax/swing//plaf/basic/BasicOptionPaneUI.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicOptionPaneUI.java,v
retrieving revision 1.21
diff -u -r1.21 BasicOptionPaneUI.java
--- javax/swing//plaf/basic/BasicOptionPaneUI.java 20 Jul 2005 14:00:39
-0000 1.21
+++ javax/swing//plaf/basic/BasicOptionPaneUI.java 13 Sep 2005 23:21:08
-0000
@@ -941,10 +941,10 @@
{
case JOptionPane.YES_NO_OPTION:
return new Object[] { YES_STRING, NO_STRING };
+ case JOptionPane.DEFAULT_OPTION:
case JOptionPane.YES_NO_CANCEL_OPTION:
return new Object[] { YES_STRING, NO_STRING, CANCEL_STRING };
case JOptionPane.OK_CANCEL_OPTION:
- case JOptionPane.DEFAULT_OPTION:
return new Object[] { OK_STRING, CANCEL_STRING };
}
return null;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] [FYI] JOptionPane fixes,
Robert Schuster <=