[kaffe] CVS kaffe (robilad): resynced with gnu classpath: swing fix

Kaffe CVS cvs-commits at kaffe.org
Sun May 15 02:37:06 PDT 2005


PatchSet 6473 
Date: 2005/05/15 09:29:26
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
resynced with gnu classpath: swing fix

2005-05-15  Dalibor Topic  <robilad at kaffe.org>

        Resynced with GNU Classpath.

        2005-04-26  Roman Kennke  <roman at kennke.org>

        * javax/swing/plaf/basic/BasicButtonUI.java
        (getPropertyPrefix): Added.
        (installDefaults): Use getPropertyPrefix instead of hard-coded
        prefix.

Members: 
	ChangeLog:1.4000->1.4001 
	libraries/javalib/javax/swing/plaf/basic/BasicButtonUI.java:1.7->1.8 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4000 kaffe/ChangeLog:1.4001
--- kaffe/ChangeLog:1.4000	Sun May 15 09:26:22 2005
+++ kaffe/ChangeLog	Sun May 15 09:29:26 2005
@@ -4,6 +4,17 @@
 
 	2005-04-26  Roman Kennke  <roman at kennke.org>
 
+        * javax/swing/plaf/basic/BasicButtonUI.java
+        (getPropertyPrefix): Added.
+        (installDefaults): Use getPropertyPrefix instead of hard-coded
+        prefix.
+
+2005-05-15  Dalibor Topic  <robilad at kaffe.org>
+
+	Resynced with GNU Classpath.
+
+	2005-04-26  Roman Kennke  <roman at kennke.org>
+
         * javax/swing/JToggleButton.java
         (JToggleButton): Removed horizontalAlignment setting, this
         was wrong. Added setting of an actionCommand, ToggleButtons
Index: kaffe/libraries/javalib/javax/swing/plaf/basic/BasicButtonUI.java
diff -u kaffe/libraries/javalib/javax/swing/plaf/basic/BasicButtonUI.java:1.7 kaffe/libraries/javalib/javax/swing/plaf/basic/BasicButtonUI.java:1.8
--- kaffe/libraries/javalib/javax/swing/plaf/basic/BasicButtonUI.java:1.7	Sat Apr 23 11:10:52 2005
+++ kaffe/libraries/javalib/javax/swing/plaf/basic/BasicButtonUI.java	Sun May 15 09:29:33 2005
@@ -107,17 +107,29 @@
     textShiftOffset = defaultTextShiftOffset;
   }
 
+  /**
+   * Returns the prefix for the UI defaults property for this UI class.
+   * This is &apos;Button&apos; for this class.
+   *
+   * @return the prefix for the UI defaults property
+   */
+  protected String getPropertyPrefix()
+  {
+    return "Button";
+  }
+
   protected void installDefaults(AbstractButton b)
   {
     UIDefaults defaults = UIManager.getLookAndFeelDefaults();
-    focusColor = defaults.getColor("Button.focus");
-    b.setForeground(defaults.getColor("Button.foreground"));
-    b.setBackground(defaults.getColor("Button.background"));
-    b.setMargin(defaults.getInsets("Button.margin"));
-    b.setBorder(defaults.getBorder("Button.border"));
-    b.setIconTextGap(defaults.getInt("Button.textIconGap"));
+    String prefix = getPropertyPrefix();
+    focusColor = defaults.getColor(prefix + ".focus");
+    b.setForeground(defaults.getColor(prefix + ".foreground"));
+    b.setBackground(defaults.getColor(prefix + ".background"));
+    b.setMargin(defaults.getInsets(prefix + ".margin"));
+    b.setBorder(defaults.getBorder(prefix + ".border"));
+    b.setIconTextGap(defaults.getInt(prefix + ".textIconGap"));
     b.setInputMap(JComponent.WHEN_FOCUSED, 
-                  (InputMap) defaults.get("Button.focusInputMap"));
+                  (InputMap) defaults.get(prefix + ".focusInputMap"));
     b.setOpaque(true);
   }
 




More information about the kaffe mailing list