summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordjee <djee@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-10 18:57:22 +0000
committerdjee <djee@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-10 18:57:22 +0000
commit2cfc09079c92fa5cfe8643097689919359562d02 (patch)
treef982d60aa675d0aa76be5289c71e041f601bb2d5
parent3e9f41bd10456f6d8117aadec53b5cbaadf537a2 (diff)
downloadgcc-2cfc09079c92fa5cfe8643097689919359562d02.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77613 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libjava/ChangeLog10
-rw-r--r--libjava/java/awt/BorderLayout.java2
-rw-r--r--libjava/java/awt/Button.java1
-rw-r--r--libjava/java/awt/Component.java2
4 files changed, 14 insertions, 1 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 9140b3d9fd7..ba68afef486 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,5 +1,15 @@
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
(GridBagLayout): New private field, internalcomptable.
(lookupInternalConstraints): New method.
diff --git a/libjava/java/awt/BorderLayout.java b/libjava/java/awt/BorderLayout.java
index 5033bcf7ab2..7f2b1a00802 100644
--- a/libjava/java/awt/BorderLayout.java
+++ b/libjava/java/awt/BorderLayout.java
@@ -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();
diff --git a/libjava/java/awt/Button.java b/libjava/java/awt/Button.java
index e4085e5f61e..a521c8e4f3d 100644
--- a/libjava/java/awt/Button.java
+++ b/libjava/java/awt/Button.java
@@ -148,6 +148,7 @@ public synchronized void
setLabel(String label)
{
this.label = label;
+ actionCommand = label;
if (peer != null)
{
ButtonPeer bp = (ButtonPeer) peer;
diff --git a/libjava/java/awt/Component.java b/libjava/java/awt/Component.java
index 0b1e9612b04..3d2afc9c78b 100644
--- a/libjava/java/awt/Component.java
+++ b/libjava/java/awt/Component.java
@@ -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();
}
/**