[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: swing
improvements
Kaffe CVS
cvs-commits at kaffe.org
Sun Jul 17 08:29:35 PDT 2005
PatchSet 6741
Date: 2005/07/17 15:24:06
Author: robilad
Branch: HEAD
Tag: (none)
Log:
Resynced with GNU Classpath: swing improvements
2005-07-17 Dalibor Topic <robilad at kaffe.org>
Resynced with GNU Classpath.
2005-07-10 Roman Kennke <roman at kennke.org>
* javax/swing/JInternalFrame.java
(pack): Set the JInternalFrame's own size here instead of
layouting its children (this is triggered by setSize anyway).
* javax/swing/plaf/basic/BasicInternalFrameUI.java
(installDefaults): Set the correct border for InternalFrames.
Set InternalFrames to invisible by default.
* javax/swing/plaf/basic/BasicLookAndFeel.java
(initComponentDefaults): Set correct color values for
InternalFrames.
Members:
ChangeLog:1.4265->1.4266
libraries/javalib/javax/swing/JInternalFrame.java:1.13->1.14
libraries/javalib/javax/swing/plaf/basic/BasicInternalFrameUI.java:1.8->1.9
libraries/javalib/javax/swing/plaf/basic/BasicLookAndFeel.java:1.15->1.16
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4265 kaffe/ChangeLog:1.4266
--- kaffe/ChangeLog:1.4265 Sun Jul 17 15:03:21 2005
+++ kaffe/ChangeLog Sun Jul 17 15:24:06 2005
@@ -1,5 +1,21 @@
2005-07-17 Dalibor Topic <robilad at kaffe.org>
+ Resynced with GNU Classpath.
+
+ 2005-07-10 Roman Kennke <roman at kennke.org>
+
+ * javax/swing/JInternalFrame.java
+ (pack): Set the JInternalFrame's own size here instead of
+ layouting its children (this is triggered by setSize anyway).
+ * javax/swing/plaf/basic/BasicInternalFrameUI.java
+ (installDefaults): Set the correct border for InternalFrames.
+ Set InternalFrames to invisible by default.
+ * javax/swing/plaf/basic/BasicLookAndFeel.java
+ (initComponentDefaults): Set correct color values for
+ InternalFrames.
+
+2005-07-17 Dalibor Topic <robilad at kaffe.org>
+
* libraries/clib/nio/FileChannelImpl.c:
(getFD) Renamed to get_native_fd. No longer static since it is used in
gnu_java_nio_channels_FileChannelImpl.c as well.
Index: kaffe/libraries/javalib/javax/swing/JInternalFrame.java
diff -u kaffe/libraries/javalib/javax/swing/JInternalFrame.java:1.13 kaffe/libraries/javalib/javax/swing/JInternalFrame.java:1.14
--- kaffe/libraries/javalib/javax/swing/JInternalFrame.java:1.13 Mon Jul 4 00:08:12 2005
+++ kaffe/libraries/javalib/javax/swing/JInternalFrame.java Sun Jul 17 15:24:11 2005
@@ -1165,7 +1165,7 @@
{
// Do nothing if they don't want to be restored first.
}
- doLayout();
+ setSize(getPreferredSize());
}
/**
Index: kaffe/libraries/javalib/javax/swing/plaf/basic/BasicInternalFrameUI.java
diff -u kaffe/libraries/javalib/javax/swing/plaf/basic/BasicInternalFrameUI.java:1.8 kaffe/libraries/javalib/javax/swing/plaf/basic/BasicInternalFrameUI.java:1.9
--- kaffe/libraries/javalib/javax/swing/plaf/basic/BasicInternalFrameUI.java:1.8 Mon Jul 4 00:08:36 2005
+++ kaffe/libraries/javalib/javax/swing/plaf/basic/BasicInternalFrameUI.java Sun Jul 17 15:24:12 2005
@@ -56,6 +56,7 @@
import java.beans.PropertyVetoException;
import java.beans.VetoableChangeListener;
+import javax.swing.BorderFactory;
import javax.swing.DefaultDesktopManager;
import javax.swing.DesktopManager;
import javax.swing.JComponent;
@@ -64,11 +65,16 @@
import javax.swing.KeyStroke;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
+import javax.swing.UIDefaults;
+import javax.swing.UIManager;
import javax.swing.border.AbstractBorder;
+import javax.swing.border.BevelBorder;
+import javax.swing.border.Border;
import javax.swing.event.InternalFrameEvent;
import javax.swing.event.InternalFrameListener;
import javax.swing.event.MouseInputAdapter;
import javax.swing.event.MouseInputListener;
+import javax.swing.plaf.BorderUIResource;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.InternalFrameUI;
import javax.swing.plaf.UIResource;
@@ -1172,9 +1178,27 @@
* This method installs the defaults specified by the look and feel.
*/
protected void installDefaults()
- {
- // FIXME: Move border to MetalBorders
- frame.setBorder(new InternalFrameBorder());
+ {
+ // This is the border of InternalFrames in the BasicLookAndFeel.
+ // Note that there exist entries for various border colors in
+ // BasicLookAndFeel's defaults, but obviously they differ
+ // from the colors that are actually used by the JDK.
+ UIDefaults defaults = UIManager.getLookAndFeelDefaults();
+ Color lineColor = new Color(238, 238, 238);
+ Border inner = BorderFactory.createLineBorder(lineColor, 1);
+ Color shadowInner = new Color(184, 207, 229);
+ Color shadowOuter = new Color(122, 138, 153);
+ Border outer = BorderFactory.createBevelBorder(BevelBorder.RAISED,
+ Color.WHITE,
+ Color.WHITE,
+ shadowOuter,
+ shadowInner);
+ Border border = new BorderUIResource.CompoundBorderUIResource(outer,
+ inner);
+ frame.setBorder(border);
+
+ // InternalFrames are invisible by default.
+ frame.setVisible(false);
}
/**
Index: kaffe/libraries/javalib/javax/swing/plaf/basic/BasicLookAndFeel.java
diff -u kaffe/libraries/javalib/javax/swing/plaf/basic/BasicLookAndFeel.java:1.15 kaffe/libraries/javalib/javax/swing/plaf/basic/BasicLookAndFeel.java:1.16
--- kaffe/libraries/javalib/javax/swing/plaf/basic/BasicLookAndFeel.java:1.15 Sun Jul 10 02:11:42 2005
+++ kaffe/libraries/javalib/javax/swing/plaf/basic/BasicLookAndFeel.java Sun Jul 17 15:24:12 2005
@@ -455,10 +455,10 @@
"InternalFrame.border",
new BorderUIResource.CompoundBorderUIResource(null, null),
"InternalFrame.borderColor", new ColorUIResource(light),
- "InternalFrame.borderDarkShadow", new ColorUIResource(shadow),
- "InternalFrame.borderHighlight", new ColorUIResource(highLight),
- "InternalFrame.borderLight", new ColorUIResource(light),
- "InternalFrame.borderShadow", new ColorUIResource(shadow),
+ "InternalFrame.borderDarkShadow", new ColorUIResource(Color.BLACK),
+ "InternalFrame.borderHighlight", new ColorUIResource(Color.WHITE),
+ "InternalFrame.borderLight", new ColorUIResource(Color.LIGHT_GRAY),
+ "InternalFrame.borderShadow", new ColorUIResource(Color.GRAY),
"InternalFrame.closeIcon", BasicIconFactory.createEmptyFrameIcon(),
// XXX Don't use gif
// "InternalFrame.icon", new IconUIResource(new ImageIcon("icons/JavaCup.gif")),
More information about the kaffe
mailing list