Commit 7b38bcac by David Jee Committed by David Jee

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.

From-SVN: r77613
parent dcee9e60
2004-02-10 David Jee <djee@redhat.com> 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 * java/awt/GridBagLayout.java
(GridBagLayout): New private field, internalcomptable. (GridBagLayout): New private field, internalcomptable.
(lookupInternalConstraints): New method. (lookupInternalConstraints): New method.
......
...@@ -637,7 +637,7 @@ private static final int PREF = 2; ...@@ -637,7 +637,7 @@ private static final int PREF = 2;
private Dimension private Dimension
calcCompSize(Component comp, int what) calcCompSize(Component comp, int what)
{ {
if (comp == null) if (comp == null || !comp.isVisible())
return new Dimension(0, 0); return new Dimension(0, 0);
if (what == MIN) if (what == MIN)
return comp.getMinimumSize(); return comp.getMinimumSize();
......
...@@ -148,6 +148,7 @@ public synchronized void ...@@ -148,6 +148,7 @@ public synchronized void
setLabel(String label) setLabel(String label)
{ {
this.label = label; this.label = label;
actionCommand = label;
if (peer != null) if (peer != null)
{ {
ButtonPeer bp = (ButtonPeer) peer; ButtonPeer bp = (ButtonPeer) peer;
......
...@@ -879,6 +879,7 @@ public abstract class Component ...@@ -879,6 +879,7 @@ public abstract class Component
this.visible = true; this.visible = true;
if (peer != null) if (peer != null)
peer.setVisible(true); peer.setVisible(true);
invalidate();
} }
/** /**
...@@ -905,6 +906,7 @@ public abstract class Component ...@@ -905,6 +906,7 @@ public abstract class Component
if (peer != null) if (peer != null)
peer.setVisible(false); peer.setVisible(false);
this.visible = false; this.visible = false;
invalidate();
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment