commit-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commit-cp] classpath ChangeLog javax/swing/plaf/basic/Basi...


From: David Gilbert
Subject: [commit-cp] classpath ChangeLog javax/swing/plaf/basic/Basi...
Date: Tue, 06 Jun 2006 20:45:25 +0000

CVSROOT:        /sources/classpath
Module name:    classpath
Changes by:     David Gilbert <trebligd>        06/06/06 20:45:25

Modified files:
        .              : ChangeLog 
        javax/swing/plaf/basic: BasicSplitPaneUI.java 
        javax/swing/plaf/metal: MetalSplitPaneDivider.java 

Log message:
        2006-06-06  David Gilbert  <address@hidden>
        
                * javax/swing/plaf/metal/MetalSplitPaneDivider.java
                (paint): If has focus, paint special background color,
                * javax/swing/plaf/basic/BasicSplitPaneUI.java
                (FocusHandler.focusGained): Implemented,
                (FocusHandler.focusLost): Implemented.
        ----------------------------------------------------------------------

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpath&r1=1.7688&r2=1.7689
http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/plaf/basic/BasicSplitPaneUI.java?cvsroot=classpath&r1=1.29&r2=1.30
http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/plaf/metal/MetalSplitPaneDivider.java?cvsroot=classpath&r1=1.8&r2=1.9

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/classpath/classpath/ChangeLog,v
retrieving revision 1.7688
retrieving revision 1.7689
diff -u -b -r1.7688 -r1.7689
--- ChangeLog   6 Jun 2006 19:56:17 -0000       1.7688
+++ ChangeLog   6 Jun 2006 20:45:22 -0000       1.7689
@@ -1,3 +1,11 @@
+2006-06-06  David Gilbert  <address@hidden>
+
+       * javax/swing/plaf/metal/MetalSplitPaneDivider.java
+       (paint): If has focus, paint special background color,
+       * javax/swing/plaf/basic/BasicSplitPaneUI.java
+       (FocusHandler.focusGained): Implemented,
+       (FocusHandler.focusLost): Implemented.
+
 2006-06-06  Tom Tromey  <address@hidden>
 
        * javax/swing/text/StyleContext.java (registerStaticAttributeKey):

Index: javax/swing/plaf/basic/BasicSplitPaneUI.java
===================================================================
RCS file: 
/sources/classpath/classpath/javax/swing/plaf/basic/BasicSplitPaneUI.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- javax/swing/plaf/basic/BasicSplitPaneUI.java        6 Jun 2006 15:12:10 
-0000       1.29
+++ javax/swing/plaf/basic/BasicSplitPaneUI.java        6 Jun 2006 20:45:25 
-0000       1.30
@@ -680,7 +680,9 @@
      */
     public void focusGained(FocusEvent ev)
     {
-      // FIXME: implement.
+      // repaint the divider because its background color may change due to
+      // the focus state...
+      divider.repaint();
     }
 
     /**
@@ -690,7 +692,9 @@
      */
     public void focusLost(FocusEvent ev)
     {
-      // FIXME: implement.
+      // repaint the divider because its background color may change due to
+      // the focus state...
+      divider.repaint();
     }
   }
 

Index: javax/swing/plaf/metal/MetalSplitPaneDivider.java
===================================================================
RCS file: 
/sources/classpath/classpath/javax/swing/plaf/metal/MetalSplitPaneDivider.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- javax/swing/plaf/metal/MetalSplitPaneDivider.java   11 May 2006 17:05:55 
-0000      1.8
+++ javax/swing/plaf/metal/MetalSplitPaneDivider.java   6 Jun 2006 20:45:25 
-0000       1.9
@@ -1,5 +1,5 @@
 /* MetalSplitPaneDivider.java
-Copyright (C) 2005 Free Software Foundation, Inc.
+Copyright (C) 2005, 2006, Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -47,15 +47,15 @@
 
 import javax.swing.JSplitPane;
 import javax.swing.SwingConstants;
+import javax.swing.UIManager;
 import javax.swing.border.Border;
 import javax.swing.plaf.basic.BasicArrowButton;
 import javax.swing.plaf.basic.BasicSplitPaneDivider;
 
 /**
- * The divider that is used by the MetalSplitPaneUI.
+ * The divider that is used by the address@hidden MetalSplitPaneUI}.
  *
  * @author Roman Kennke (address@hidden)
- *
  */
 class MetalSplitPaneDivider extends BasicSplitPaneDivider
 {
@@ -72,7 +72,7 @@
   int orientation;
   
   /**
-   * Creates a new instance of MetalSplitPaneDivider.
+   * Creates a new instance of <code>MetalSplitPaneDivider</code>.
    *
    * @param ui the <code>MetalSplitPaneUI</code> that uses this divider
    */
@@ -95,6 +95,12 @@
   {
     Dimension s = getSize();
 
+    if (splitPane.hasFocus())
+      {
+        g.setColor(UIManager.getColor("SplitPane.dividerFocusColor"));
+        g.fillRect(0, 0, s.width, s.height);
+      }
+    
     // Paint border if one exists.
     Border border = getBorder();
     if (border != null)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]