2004-02-10 David Jee <djee@redhat.com>
authorDavid Jee <djee@redhat.com>
Tue, 10 Feb 2004 18:57:22 +0000 (18:57 +0000)
committerDavid Jee <djee@gcc.gnu.org>
Tue, 10 Feb 2004 18:57:22 +0000 (18:57 +0000)
* java/awt/BorderLayout.java
(calcCompSize): Invisible components get zero dimensions.
* java/awt/Button.java
(setLabel): Set actionCommand.
* java/awt/Component.java
(show): Invalidate component and parent container.
(hide): Likewise.

From-SVN: r77613

libjava/ChangeLog
libjava/java/awt/BorderLayout.java
libjava/java/awt/Button.java
libjava/java/awt/Component.java

index 9140b3d9fd78ba3f9f232ecb36bf625608d8e512..ba68afef486bd58f524e50350fb900a872591b6f 100644 (file)
@@ -1,3 +1,13 @@
+2004-02-10  David Jee  <djee@redhat.com>
+
+       * java/awt/BorderLayout.java
+       (calcCompSize): Invisible components get zero dimensions.
+       * java/awt/Button.java
+       (setLabel): Set actionCommand.
+       * java/awt/Component.java
+       (show): Invalidate component and parent container.
+       (hide): Likewise.
+
 2004-02-10  David Jee  <djee@redhat.com>
 
        * java/awt/GridBagLayout.java
index 5033bcf7ab29a1fe37043c37910bda2f9188c365..7f2b1a00802d5c61ebd329b3013ca6c150729dee 100644 (file)
@@ -637,7 +637,7 @@ private static final int PREF = 2;
 private Dimension
 calcCompSize(Component comp, int what)
 {
-  if (comp == null)
+  if (comp == null || !comp.isVisible())
     return new Dimension(0, 0);
   if (what == MIN)
     return comp.getMinimumSize();
index e4085e5f61e13e4da24cdb33c5a0c1579dced709..a521c8e4f3d602e626e6f67ff3fec065e7265482 100644 (file)
@@ -148,6 +148,7 @@ public synchronized void
 setLabel(String label)
 {
   this.label = label;
+  actionCommand = label;
   if (peer != null)
     {
       ButtonPeer bp = (ButtonPeer) peer;
index 0b1e9612b0478d1e2fe239df9530d6b7d124f83c..3d2afc9c78bb4494651ca56a78b9c6d57c9ff0c7 100644 (file)
@@ -879,6 +879,7 @@ public abstract class Component
     this.visible = true;
     if (peer != null)
       peer.setVisible(true);
+    invalidate();
   }
 
   /**
@@ -905,6 +906,7 @@ public abstract class Component
     if (peer != null)
       peer.setVisible(false);
     this.visible = false;
+    invalidate();
   }
 
   /**