[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: xml, swing, awt.
Kaffe CVS
cvs-commits at kaffe.org
Wed Sep 21 08:14:59 PDT 2005
PatchSet 6926
Date: 2005/09/21 15:07:53
Author: robilad
Branch: HEAD
Tag: (none)
Log:
Resynced with GNU Classpath: xml, swing, awt.
Members:
ChangeLog:1.4448->1.4449
libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GdkFontPeer.c:1.10->1.11
libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c:1.20->1.21
libraries/javalib/gnu/java/net/protocol/jar/Connection.java:1.9->1.10
libraries/javalib/java/awt/Button.java:1.13->1.14
libraries/javalib/java/awt/Checkbox.java:1.10->1.11
libraries/javalib/java/awt/CheckboxMenuItem.java:1.18->1.19
libraries/javalib/java/awt/Component.java:1.60->1.61
libraries/javalib/java/awt/Dialog.java:1.15->1.16
libraries/javalib/java/awt/Frame.java:1.29->1.30
libraries/javalib/java/awt/List.java:1.8->1.9
libraries/javalib/java/awt/Menu.java:1.15->1.16
libraries/javalib/java/awt/MenuItem.java:1.23->1.24
libraries/javalib/java/awt/PopupMenu.java:1.13->1.14
libraries/javalib/java/awt/ScrollPane.java:1.20->1.21
libraries/javalib/java/awt/TextArea.java:1.8->1.9
libraries/javalib/java/awt/TextComponent.java:1.8->1.9
libraries/javalib/java/awt/TextField.java:1.6->1.7
libraries/javalib/java/awt/Window.java:1.40->1.41
libraries/javalib/java/text/DateFormat.java:1.30->1.31
libraries/javalib/javax/print/DocFlavor.java:1.4->1.5
libraries/javalib/javax/swing/JLayeredPane.java:1.12->1.13
libraries/javalib/javax/swing/JPopupMenu.java:1.15->1.16
libraries/javalib/javax/swing/JRootPane.java:1.15->1.16
libraries/javalib/javax/swing/JTable.java:1.30->1.31
libraries/javalib/javax/swing/JTree.java:1.30->1.31
libraries/javalib/javax/swing/ToolTipManager.java:1.11->1.12
libraries/javalib/javax/swing/border/TitledBorder.java:1.3->1.4
libraries/javalib/javax/swing/filechooser/FileView.java:1.3->1.4
libraries/javalib/javax/swing/plaf/basic/BasicArrowButton.java:1.11->1.12
libraries/javalib/javax/swing/plaf/basic/BasicButtonUI.java:1.13->1.14
libraries/javalib/javax/swing/plaf/basic/BasicComboBoxUI.java:1.12->1.13
libraries/javalib/javax/swing/plaf/basic/BasicInternalFrameUI.java:1.13->1.14
libraries/javalib/javax/swing/plaf/basic/BasicLookAndFeel.java:1.28->1.29
libraries/javalib/javax/swing/plaf/basic/BasicMenuBarUI.java:1.9->1.10
libraries/javalib/javax/swing/plaf/basic/BasicTextFieldUI.java:1.4->1.5
libraries/javalib/javax/swing/plaf/basic/BasicTextPaneUI.java:1.5->1.6
libraries/javalib/javax/swing/plaf/basic/BasicTextUI.java:1.22->1.23
libraries/javalib/javax/swing/plaf/basic/BasicTreeUI.java:1.23->1.24
libraries/javalib/javax/swing/plaf/metal/MetalBorders.java:1.9->1.10
libraries/javalib/javax/swing/plaf/metal/MetalComboBoxButton.java:INITIAL->1.1
libraries/javalib/javax/swing/plaf/metal/MetalComboBoxUI.java:1.3->1.4
libraries/javalib/javax/swing/plaf/metal/MetalLookAndFeel.java:1.23->1.24
libraries/javalib/javax/swing/text/DefaultEditorKit.java:1.15->1.16
libraries/javalib/javax/swing/text/DefaultStyledDocument.java:1.6->1.7
libraries/javalib/javax/swing/text/html/HTMLEditorKit.java:1.4->1.5
libraries/javalib/javax/xml/namespace/QName.java:1.13->1.14
libraries/javalib/javax/xml/transform/TransformerConfigurationException.java:1.10->1.11
libraries/javalib/javax/xml/transform/TransformerException.java:1.13->1.14
libraries/javalib/javax/xml/transform/TransformerFactoryConfigurationError.java:1.9->1.10
libraries/javalib/javax/xml/xpath/XPathException.java:1.5->1.6
libraries/javalib/javax/xml/xpath/XPathExpressionException.java:1.5->1.6
libraries/javalib/javax/xml/xpath/XPathFactoryConfigurationException.java:1.5->1.6
libraries/javalib/javax/xml/xpath/XPathFunctionException.java:1.5->1.6
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4448 kaffe/ChangeLog:1.4449
--- kaffe/ChangeLog:1.4448 Wed Sep 21 03:18:46 2005
+++ kaffe/ChangeLog Wed Sep 21 15:07:53 2005
@@ -1,3 +1,361 @@
+2005-09-21 Dalibor Topic <robilad at kaffe.org>
+
+ Resynced with GNU Classpath.
+
+ 2005-09-21 Lillian Angel <langel at redhat.com>
+
+ * javax/swing/ToolTipManager.java
+ (showTip): Added code to move currentPoint to a new place.
+ (getGoodPoint): Removed, not needed.
+
+ 2005-09-21 David Gilbert <david.gilbert at object-refinery.com>
+
+ * javax/swing/plaf/metal/MetalFileChooserUI.java: new file (partial
+ implementation).
+
+ 2005-09-20 Lillian Angel <langel at redhat.com>
+
+ * javax/swing/JPopupMenu.java
+ (setVisible): If HeavyWeightPopup, setLightWeightPopupEnabled
+ is false.
+ * javax/swing/ToolTipManager.java
+ (showTip): Change so toolTips on lightWeightPopups are
+ added different than those on heavyWeightPopups.
+ (canToolTipFit): Removed. This is not needed/used.
+
+ 2005-09-20 Lillian Angel <langel at redhat.com>
+
+ * javax/swing/ToolTipManager.java
+ (mouseMoved): Removed unneeded code. If the mouse
+ moves into another component, then mouseEntered would
+ do the same thing. Otherwise, it is not needed.
+ (showTip): Fixed so that the containerPanel is an
+ instance of Panel. Made code more efficent.
+ Tooltips were causing weird problems with the
+ JMenus.
+ (getGoodPoint): Fixed to return a better location.
+ * javax/swing/plaf/basic/BasicMenuBarUI.java
+ (mouseClicked): Fixed to prevent a NPE.
+
+ 2005-09-20 Tom Tromey <tromey at redhat.com>
+
+ PR classpath/22906:
+ * gnu/java/net/protocol/jar/Connection.java (get): Added useCaches
+ argument.
+ (connect): Updated.
+
+ 2005-09-20 Tom Tromey <tromey at redhat.com>
+
+ * javax/print/DocFlavor.java (serialVersionUID): Fixed typo.
+
+ 2005-09-19 Anthony Balkissoon <abalkiss at redhat.com>
+
+ * javax/swing/text/DefaultEditorKit.java:
+ (write): Partially Implemented and made slight correction to API docs.
+ * javax/swing/text/html/HTMLEditorKit.java:
+ (createDefaultDocument): Override parent method because we need to
+ return an HTMLDocument not a DefaultStyledDocument.
+
+ 2005-09-20 Roman Kennke <kennke at aicas.com>
+
+ Fixes PR #23900.
+ * javax/swing/JLayeredPane.java
+ (remove(int)): Removed repaint() call. This is unnecessary because
+ already triggered by Container.remove().
+ (remove(Component)): Removed this superfluous method. It's not
+ in the specs and the functionality is already in Container.
+ (paint): New method. Overridden in order to provide reasonable
+ painting for JLayeredPanes.
+
+ 2005-09-20 Roman Kennke <kennke at aicas.com>
+
+ * javax/swing/plaf/basic/BasicTextUI.java
+ (UpdateHandler): Renamed to PropertyChangeHandler. This name is
+ closer to the purpose of this class.
+ (PropertyChangeHandler.propertyChange): Delegate property change
+ to propertyChange hook method in the enclosing BasicTextUI.
+ (propertyChange): New protected method. This serves as a hook
+ for subclasses to handle property changes in the text component.
+ * javax/swing/plaf/basic/BasicTextUI.java
+ (properyChange): Handle editable property here and adjust background
+ accordingly.
+
+ 2005-09-20 Roman Kennke <kennke at aicas.com>
+
+ * javax/swing/text/DefaultStyledDocument.java
+ (getParagraphElement): If the position argument is out of the
+ document's bounds, then the closest paragraph element must be
+ returned. This is fixed.
+
+ 2005-09-20 Roman Kennke <kennke at aicas.com>
+
+ * javax/swing/JTable.java
+ (resizeAndRepaint): New protected method.
+
+ 2005-09-20 Tom Tromey <tromey at redhat.com>
+
+ * javax/xml/namespace/QName.java: Now Serializable.
+ (serialVersionUID): New field.
+ (qName, hashCode): Now transient.
+ (QName): Don't compute qName here.
+ (equals): Now final.
+ (hashCode): Simplified.
+ (toString): Compute qName here.
+
+ 2005-09-20 Roman Kennke <kennke at aicas.com>
+
+ * javax/swing/plaf/metal/MetalBorders.java
+ (getTextFieldBorder): This method must return an BorderUIResource
+ instance. Fixed.
+
+ 2005-09-20 Roman Kennke <kennke at aicas.com>
+
+ * javax/swing/plaf/basic/BasicButtonUI.java
+ (installDefaults): Handle the rollover UIDefaults property.
+ (paintText): Correctly paint disabled button label text.
+ * javax/swing/plaf/basic/BasicLookAndFeel.java
+ (initComponentDefaults): Fix some text component border defaults.
+ * javax/swing/plaf/basic/BasicTextPaneUI.java
+ (installUI): New method. This sets up some style attributes
+ for the JTextPane.
+
+ 2005-09-20 Roman Kennke <kennke at aicas.com>
+
+ * javax/swing/plaf/metal/MetalLookAndFeel.java
+ (initComponentDefault): Added and fixed some UI defaults.
+
+ 2005-09-20 Roman Kennke <kennke at aicas.com>
+
+ * javax/swing/plaf/metal/MetalBorders.java
+ (ButtonBorder.paintBorder): Fetch correct color for disabled
+ button border.
+ (getTextFieldBorder): Correctly initialize text field border. This
+ should be a compound border with a MarginBorder and TextFieldBorder
+ instead of a plain TextFieldBorder.
+ (getTextBorder): New method.
+
+ 2005-09-20 Roman Kennke <kennke at aicas.com>
+
+ * javax/swing/text/DefaultStyledDocument.java
+ (setParagraphAttributes): Implemented this method.
+ (insertUpdate): Fixed attribute comparison to avoid NPE.
+
+ 2005-09-20 Thomas Fitzsimmons <fitzsim at redhat.com>
+
+ PR awt/23951
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
+ (isRealized): Leave GDK critical region when exiting early.
+
+ 2005-09-19 Tom Tromey <tromey at redhat.com>
+
+ * java/awt/PopupMenu.java (AccessibleAWTPopupMenu.serialVersionUID):
+ New field.
+ * java/awt/TextField.java (AccessibleAWTTextField.serialVersionUID):
+ New field.
+ * java/awt/TextArea.java (AccessibleAWTTextArea.serialVersionUID):
+ New field.
+ * java/awt/Menu.java (AccessibleAWTMenu.serialVersionUID): New field.
+ * java/awt/CheckboxMenuItem.java (AccessibleAWTCheckboxMenuItem.serialVersionUID):
+ New field.
+ * java/awt/TextComponent.java (AccessibleAWTTextComponent.serialVersionUID):
+ New field.
+ * java/awt/MenuItem.java (AccessibleAWTMenuItem.serialVersionUID):
+ New field.
+ * java/awt/Frame.java (AccessibleAWTFrame.serialVersionUID): New
+ field.
+ * java/awt/Dialog.java (AccessibleAWTDialog.serialVersionUID): New
+ field.
+ * java/awt/Button.java (AccessibleAWTButton.serialVersionUID): New
+ field.
+ * java/awt/Window.java (AccessibleAWTWindow.serialVersionUID): New
+ field.
+ * java/awt/ScrollPane.java (AccessibleAWTScrollPane.serialVersionUID):
+ New field.
+ * java/awt/List.java (AccessibleAWTList.serialVersionUID): New field.
+ (AccessibleAWTListChild.serialVersionUID): Likewise.
+ (AccessibleAWTListChild.parent): Moved earlier.
+ (AccessibleAWTListChild.indexInParent): Renamed.
+
+ 2005-09-19 David Gilbert <david.gilbert at object-refinery.com>
+
+ * javax/swing/filechooser/FileView.java:
+ Reformatted and added API doc comments.
+
+ 2005-09-19 Anthony Balkissoon <abalkiss at redhat.com>
+
+ * javax/swing/JRootPane.java:
+ (createGlassPane): Don't set the layout manager to BorderLayout. Leave
+ it as JPanel's default FlowLayout.
+
+ 2005-09-19 Lillian Angel <langel at redhat.com>
+
+ * javax/swing/ToolTipManager.java:
+ Changed tooltip to be JDialog (no entry in taskbar),
+ instead of JWindow.
+ (actionPerformed): No need to start timer here.
+ (mouseEntered): No need to call showTip here, it is called
+ when the timer fires.
+ (showTip): Shouldn't show tip if it is already visible or
+ the current component is not showing.
+ * javax/swing/plaf/basic/BasicTreeUI.java
+ (getRowForPath): Re-implemented.
+ (mousePressed): Call getRowForPath instead, also
+ added a check in for leaf icons.
+
+ 2005-09-19 Anthony Balkissoon <abalkiss at redhat.com>
+
+ * javax/swing/JLayeredPane.java:
+ (<init>): Set layout manager to null.
+
+ 2005-09-19 Anthony Balkissoon <abalkiss at redhat.com>
+
+ * javax/swing/plaf/basic/BasicInternalFrameUI.java:
+ (GlassPaneDispatcher.handleEvent): Added check for mouseEventTarget
+ being null to avoid NPE.
+
+ 2005-09-19 Anthony Balkissoon <abalkiss at redhat.com>
+
+ * javax/swing/JRootPane.java:
+ (RootLayout.layoutContainer): Added comment about how the
+ components should be sized. Fixed size of glassPane which fills the
+ entire viewable region, including overtop the menuBar. Used bounds
+ minus insets for containerSize, as indicated in comment, rather than
+ getSize(). Used setBounds instead of setSize for layeredPane because
+ its relation to the other components' sizes is more obvious that way.
+
+ 2005-09-19 Anthony Balkissoon <abalkiss at redhat.com>
+
+ * javax/swing/plaf/basic/BasicInternalFrameUI.java:
+ (GlassPaneDispatcher.handleEvent): Replaced call to SwingUtilities'
+ convertMouseEvent (with identical source and desination) with a simple
+ cast. If acquireComponentForMouseEvent reveals we're going to
+ re-dispatch this event to ourselves (and loop infinitely), return. Also
+ replaced contentPane by glassPane as the source argument to
+ SwingUtilities.convertMouseEvent since the glassPane is the real source.
+
+ 2005-09-19 David Gilbert <david.gilbert at object-refinery.com>
+
+ * javax/swing/plaf/basic/BasicArrowButton.java
+ (paintTriangle): minor correction to highlight on triangle for disabled
+ buttons.
+
+ 2005-09-19 Tom Tromey <tromey at redhat.com>
+
+ * javax/print/DocFlavor.java (BYTE_ARRAY.serialVersionUID): New field.
+ (INPUT_STREAM.serialVersionUID): Likewise.
+
+ 2005-09-19 Tom Tromey <tromey at redhat.com>
+
+ * java/text/DateFormat.java (serialVersionUID): New field.
+
+ 2005-19-19 Lillian Angel <langel at redhat.com>
+
+ * javax/swing/plaf/basic/BasicTreeUI.java
+ (selectPath): Changed so DISCONTIGUOUS_TREE_SELECTION is the
+ default.
+ * javax/swing/JTree.java
+ (AccessibleJTreeNode): Initialized all fields.
+ (addAccessibleSelection): Implemented.
+ (clearAccessibleSelection): Implemented.
+ (doAccessibleAction): Implemented.
+ (getAccessibleAction): Implemented.
+ (getAccessibleActionCount): Implemented.
+ (getAccessibleActionDescription): Implemented.
+ (getAccesssibleChild): Remove mod variable, made global.
+ (getAccessibleComponent): Changed to return this, since this
+ class implements AccessibleComponent.
+ (getAccessibleSelection): Likewise.
+ (getAccessibleSelection): Implemented.
+ (getAccessibleSelectionCount): Implemented.
+ (getAccessibleStateSet): Remove mod variable, made global.
+ (getCursor): Implemented.
+ (isAccessibleChildSelected): Remove mod variable, made global.
+ (removeAccessibleSelection): Implemented.
+ (selectAllAccessibleSelection): Implemented.
+ (setCursor): Implemented.
+ (AccessibleJTree): Nothing to do.
+ (getAccessibleAt): Implemented.
+ (getAccessibleSelection): Implemented.
+ (getAccessibleSelection): Implemented.
+
+ 2005-09-19 Tom Tromey <tromey at redhat.com>
+
+ * javax/xml/xpath/XPathFunctionException.java (serialVersionUID): New
+ field.
+ * javax/xml/xpath/XPathFactoryConfigurationException.java
+ (serialVersionUID): New field.
+ * javax/xml/xpath/XPathExpressionException.java (serialVersionUID): New
+ field.
+ * javax/xml/xpath/XPathException.java (serialVersionUID): New field.
+ * javax/xml/transform/TransformerConfigurationException.java (locator):
+ Removed.
+ (TransformerConfigurationException): Pass locator to super constructor.
+ (serialVersionUID): New field.
+ * javax/xml/transform/TransformerFactoryConfigurationError.java
+ (serialVersionUID): New field.
+ * javax/xml/transform/TransformerException.java (containedException):
+ Renamed field.
+ (serialVersionUID): New field.
+
+ 2005-09-19 Roman Kennke <kennke at aicas.com>
+
+ * javax/swing/plaf/basic/BasicTextUI.java
+ (UpdateHandler.propertyChange): Handle changes of the editable
+ property.
+ (paintBackground): Moved implementation to
+ UpdateHandler.propertyChange. This method itself should not fill
+ the background.
+
+ 2005-09-19 Roman Kennke <kennke at aicas.com>
+
+ * javax/swing/border/TitledBorder.java
+ (paintBorder): Correctly set the Y offset for the border title.
+ (getMeasurements): Determine the correct Y offset for the border
+ title.
+
+ 2005-09-19 Robert Schuster <robertschuster at fsfe.org>
+
+ * java/awt/Checkbox.java:
+ (Checkbox): Properly set as selected checkbox in corresponding
+ checkbox group.
+ (paramString): Removed checkbox group information.
+ * java/awt/Component.java:
+ (paramString): Removed redundant "=".
+
+ 2005-09-19 David Gilbert <david.gilbert at object-refinery.com>
+
+ * javax/swing/plaf/basic/BasicComboBoxUI.java
+ (installComponents): call configureArrowButton after creating button,
+ (configureEditor): set the selected item,
+ (configureArrowButton): set a zero margin,
+ (getPreferredSize): delegate to getMinimumSize(),
+ (getMinimumSize): now uses code that was in getPreferredSize(),
+ (getDefaultSize): reduce default height,
+ (ComboBoxLayoutManager.layoutComponent): use comboBox height as button
+ width,
+ (PropertyChangeHandler.propertyChange): set font on arrow button,
+ * javax/swing/plaf/metal/MetalComboBoxUI.java
+ (instances): deleted field,
+ (MetalComboBoxLayoutManager): new class,
+ (MetalPropertyChangeListener): new class,
+ (MetalComboPopup): new class,
+ (createUI): just return new instance,
+ (createEditor): implemented,
+ (createPopup): implemented,
+ (createArrowButton): implemented,
+ (createPropertyChangeListener): implemented,
+ (paint): implemented,
+ (editablePropertyChanged): implemented,
+ (createLayoutManager): implemented,
+ (removeListeners): implemented,
+ (getMinimumSize): implemented.
+
+ 2005-09-19 Andreas Tobler <a.tobler at schweiz.ch>
+
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontPeer.c
+ (Java_gnu_java_awt_peer_gtk_GdkFontPeer_dispose): Fix double
+ unreferencing pfont->font. Unref pfont->layout instead.
+
2005-09-20 Dalibor Topic <robilad at kaffe.org>
Resynced with GNU Classpath.
Index: kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GdkFontPeer.c
diff -u kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GdkFontPeer.c:1.10 kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GdkFontPeer.c:1.11
--- kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GdkFontPeer.c:1.10 Fri Aug 19 01:27:50 2005
+++ kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GdkFontPeer.c Wed Sep 21 15:07:56 2005
@@ -98,7 +98,7 @@
pfont = (struct peerfont *)NSA_DEL_FONT_PTR (env, self);
g_assert (pfont != NULL);
if (pfont->layout != NULL)
- g_object_unref (pfont->font);
+ g_object_unref (pfont->layout);
if (pfont->font != NULL)
g_object_unref (pfont->font);
if (pfont->ctx != NULL)
Index: kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
diff -u kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c:1.20 kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c:1.21
--- kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c:1.20 Wed Sep 14 22:19:46 2005
+++ kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c Wed Sep 21 15:07:56 2005
@@ -762,7 +762,10 @@
ptr = NSA_GET_PTR (env, obj);
if (ptr == NULL)
- return FALSE;
+ {
+ gdk_threads_leave ();
+ return FALSE;
+ }
ret_val = GTK_WIDGET_REALIZED (GTK_WIDGET (ptr));
Index: kaffe/libraries/javalib/gnu/java/net/protocol/jar/Connection.java
diff -u kaffe/libraries/javalib/gnu/java/net/protocol/jar/Connection.java:1.9 kaffe/libraries/javalib/gnu/java/net/protocol/jar/Connection.java:1.10
--- kaffe/libraries/javalib/gnu/java/net/protocol/jar/Connection.java:1.9 Mon Jul 4 00:05:32 2005
+++ kaffe/libraries/javalib/gnu/java/net/protocol/jar/Connection.java Wed Sep 21 15:07:56 2005
@@ -69,13 +69,17 @@
private static Hashtable cache = new Hashtable();
private static final int READBUFSIZE = 4*1024;
- public static synchronized JarFile get (URL url) throws IOException
+ public static synchronized JarFile get (URL url, boolean useCaches)
+ throws IOException
{
- JarFile jf = (JarFile) cache.get (url);
+ JarFile jf;
+ if (useCaches)
+ {
+ jf = (JarFile) cache.get (url);
+ if (jf != null)
+ return jf;
+ }
- if (jf != null)
- return jf;
-
if ("file".equals (url.getProtocol()))
{
File f = new File (url.getFile());
@@ -100,9 +104,10 @@
jf = new JarFile (f, true,
ZipFile.OPEN_READ | ZipFile.OPEN_DELETE);
}
-
- cache.put (url, jf);
-
+
+ if (useCaches)
+ cache.put (url, jf);
+
return jf;
}
}
@@ -120,7 +125,7 @@
return;
jar_url = getJarFileURL();
- jar_file = JarFileCache.get (jar_url);
+ jar_file = JarFileCache.get (jar_url, useCaches);
String entry_name = getEntryName();
if (entry_name != null
Index: kaffe/libraries/javalib/java/awt/Button.java
diff -u kaffe/libraries/javalib/java/awt/Button.java:1.13 kaffe/libraries/javalib/java/awt/Button.java:1.14
--- kaffe/libraries/javalib/java/awt/Button.java:1.13 Mon Jul 4 00:06:01 2005
+++ kaffe/libraries/javalib/java/awt/Button.java Wed Sep 21 15:07:56 2005
@@ -98,6 +98,8 @@
protected class AccessibleAWTButton extends AccessibleAWTComponent
implements AccessibleAction, AccessibleValue
{
+ public static final long serialVersionUID = -5932203980244017102L;
+
protected AccessibleAWTButton()
{
// Do nothing here.
Index: kaffe/libraries/javalib/java/awt/Checkbox.java
diff -u kaffe/libraries/javalib/java/awt/Checkbox.java:1.10 kaffe/libraries/javalib/java/awt/Checkbox.java:1.11
--- kaffe/libraries/javalib/java/awt/Checkbox.java:1.10 Mon Jul 4 00:06:01 2005
+++ kaffe/libraries/javalib/java/awt/Checkbox.java Wed Sep 21 15:07:58 2005
@@ -392,6 +392,11 @@
this.label = label;
this.state = state;
this.group = group;
+
+ if ( state && group != null )
+ {
+ group.setSelectedCheckbox(this);
+ }
}
/*************************************************************************/
@@ -610,8 +615,10 @@
protected String
paramString()
{
- return ("label=" + label + ",state=" + state + ",group=" + group
- + "," + super.paramString());
+ // Note: We cannot add the checkbox group information here because this
+ // would trigger infinite recursion when CheckboxGroup.toString() is
+ // called and the box is in its selected state.
+ return ("label=" + label + ",state=" + state + "," + super.paramString());
}
/**
Index: kaffe/libraries/javalib/java/awt/CheckboxMenuItem.java
diff -u kaffe/libraries/javalib/java/awt/CheckboxMenuItem.java:1.18 kaffe/libraries/javalib/java/awt/CheckboxMenuItem.java:1.19
--- kaffe/libraries/javalib/java/awt/CheckboxMenuItem.java:1.18 Mon Jul 4 00:06:01 2005
+++ kaffe/libraries/javalib/java/awt/CheckboxMenuItem.java Wed Sep 21 15:07:58 2005
@@ -335,6 +335,8 @@
implements AccessibleAction, AccessibleValue
{
// I think the base class provides the necessary implementation
+
+ private static final long serialVersionUID = -1122642964303476L;
}
/**
Index: kaffe/libraries/javalib/java/awt/Component.java
diff -u kaffe/libraries/javalib/java/awt/Component.java:1.60 kaffe/libraries/javalib/java/awt/Component.java:1.61
--- kaffe/libraries/javalib/java/awt/Component.java:1.60 Fri Sep 16 22:25:20 2005
+++ kaffe/libraries/javalib/java/awt/Component.java Wed Sep 21 15:07:59 2005
@@ -4240,9 +4240,9 @@
if (isDoubleBuffered())
param.append(",doublebuffered");
if (parent == null)
- param.append(",parent==null");
+ param.append(",parent=null");
else
- param.append(",parent==").append(parent.getName());
+ param.append(",parent=").append(parent.getName());
return param.toString();
}
Index: kaffe/libraries/javalib/java/awt/Dialog.java
diff -u kaffe/libraries/javalib/java/awt/Dialog.java:1.15 kaffe/libraries/javalib/java/awt/Dialog.java:1.16
--- kaffe/libraries/javalib/java/awt/Dialog.java:1.15 Mon Jul 4 00:06:02 2005
+++ kaffe/libraries/javalib/java/awt/Dialog.java Wed Sep 21 15:07:59 2005
@@ -519,6 +519,8 @@
protected class AccessibleAWTDialog extends AccessibleAWTWindow
{
+ private static final long serialVersionUID = 4837230331833941201L;
+
public AccessibleRole getAccessibleRole()
{
return AccessibleRole.DIALOG;
Index: kaffe/libraries/javalib/java/awt/Frame.java
diff -u kaffe/libraries/javalib/java/awt/Frame.java:1.29 kaffe/libraries/javalib/java/awt/Frame.java:1.30
--- kaffe/libraries/javalib/java/awt/Frame.java:1.29 Wed Aug 17 22:38:30 2005
+++ kaffe/libraries/javalib/java/awt/Frame.java Wed Sep 21 15:07:59 2005
@@ -591,6 +591,8 @@
protected class AccessibleAWTFrame extends AccessibleAWTWindow
{
+ private static final long serialVersionUID = -6172960752956030250L;
+
public AccessibleRole getAccessibleRole()
{
return AccessibleRole.FRAME;
Index: kaffe/libraries/javalib/java/awt/List.java
diff -u kaffe/libraries/javalib/java/awt/List.java:1.8 kaffe/libraries/javalib/java/awt/List.java:1.9
--- kaffe/libraries/javalib/java/awt/List.java:1.8 Sat Jul 30 16:39:16 2005
+++ kaffe/libraries/javalib/java/awt/List.java Wed Sep 21 15:07:59 2005
@@ -1088,18 +1088,23 @@
protected class AccessibleAWTList extends AccessibleAWTComponent
implements AccessibleSelection, ItemListener, ActionListener
{
+ private static final long serialVersionUID = 7924617370136012829L;
+
protected class AccessibleAWTListChild extends AccessibleAWTComponent
implements Accessible
{
- private int index;
+ private static final long serialVersionUID = 4412022926028300317L;
+
+ // Field names are fixed by serialization spec.
private List parent;
+ private int indexInParent;
public AccessibleAWTListChild(List parent, int indexInParent)
{
this.parent = parent;
- index = indexInParent;
+ this.indexInParent = indexInParent;
if (parent == null)
- index = -1;
+ this.indexInParent = -1;
}
/* (non-Javadoc)
@@ -1118,14 +1123,14 @@
public AccessibleStateSet getAccessibleStateSet()
{
AccessibleStateSet states = super.getAccessibleStateSet();
- if (parent.isIndexSelected(index))
+ if (parent.isIndexSelected(indexInParent))
states.add(AccessibleState.SELECTED);
return states;
}
public int getAccessibleIndexInParent()
{
- return index;
+ return indexInParent;
}
}
Index: kaffe/libraries/javalib/java/awt/Menu.java
diff -u kaffe/libraries/javalib/java/awt/Menu.java:1.15 kaffe/libraries/javalib/java/awt/Menu.java:1.16
--- kaffe/libraries/javalib/java/awt/Menu.java:1.15 Mon Jul 4 00:06:06 2005
+++ kaffe/libraries/javalib/java/awt/Menu.java Wed Sep 21 15:07:59 2005
@@ -441,6 +441,8 @@
*/
protected class AccessibleAWTMenu extends AccessibleAWTMenuItem
{
+ private static final long serialVersionUID = 5228160894980069094L;
+
protected AccessibleAWTMenu()
{
}
Index: kaffe/libraries/javalib/java/awt/MenuItem.java
diff -u kaffe/libraries/javalib/java/awt/MenuItem.java:1.23 kaffe/libraries/javalib/java/awt/MenuItem.java:1.24
--- kaffe/libraries/javalib/java/awt/MenuItem.java:1.23 Sat Jul 30 16:39:16 2005
+++ kaffe/libraries/javalib/java/awt/MenuItem.java Wed Sep 21 15:07:59 2005
@@ -108,6 +108,8 @@
extends MenuComponent.AccessibleAWTMenuComponent
implements AccessibleAction, AccessibleValue
{
+ private static final long serialVersionUID = -217847831945965825L;
+
/** Constructor */
public AccessibleAWTMenuItem()
{
Index: kaffe/libraries/javalib/java/awt/PopupMenu.java
diff -u kaffe/libraries/javalib/java/awt/PopupMenu.java:1.13 kaffe/libraries/javalib/java/awt/PopupMenu.java:1.14
--- kaffe/libraries/javalib/java/awt/PopupMenu.java:1.13 Mon Jul 4 00:06:06 2005
+++ kaffe/libraries/javalib/java/awt/PopupMenu.java Wed Sep 21 15:07:59 2005
@@ -140,6 +140,8 @@
protected class AccessibleAWTPopupMenu extends AccessibleAWTMenu
{
+ private static final long serialVersionUID = -4282044795947239955L;
+
protected AccessibleAWTPopupMenu()
{
}
Index: kaffe/libraries/javalib/java/awt/ScrollPane.java
diff -u kaffe/libraries/javalib/java/awt/ScrollPane.java:1.20 kaffe/libraries/javalib/java/awt/ScrollPane.java:1.21
--- kaffe/libraries/javalib/java/awt/ScrollPane.java:1.20 Mon Jul 4 00:06:07 2005
+++ kaffe/libraries/javalib/java/awt/ScrollPane.java Wed Sep 21 15:07:59 2005
@@ -592,6 +592,8 @@
protected class AccessibleAWTScrollPane extends AccessibleAWTContainer
{
+ private static final long serialVersionUID = 6100703663886637L;
+
public AccessibleRole getAccessibleRole()
{
return AccessibleRole.SCROLL_PANE;
Index: kaffe/libraries/javalib/java/awt/TextArea.java
diff -u kaffe/libraries/javalib/java/awt/TextArea.java:1.8 kaffe/libraries/javalib/java/awt/TextArea.java:1.9
--- kaffe/libraries/javalib/java/awt/TextArea.java:1.8 Mon Jul 4 00:06:07 2005
+++ kaffe/libraries/javalib/java/awt/TextArea.java Wed Sep 21 15:07:59 2005
@@ -603,6 +603,8 @@
protected class AccessibleAWTTextArea extends AccessibleAWTTextComponent
{
+ private static final long serialVersionUID = 3472827823632144419L;
+
protected AccessibleAWTTextArea()
{
}
Index: kaffe/libraries/javalib/java/awt/TextComponent.java
diff -u kaffe/libraries/javalib/java/awt/TextComponent.java:1.8 kaffe/libraries/javalib/java/awt/TextComponent.java:1.9
--- kaffe/libraries/javalib/java/awt/TextComponent.java:1.8 Wed Aug 17 22:38:30 2005
+++ kaffe/libraries/javalib/java/awt/TextComponent.java Wed Sep 21 15:07:59 2005
@@ -107,6 +107,8 @@
extends AccessibleAWTComponent
implements AccessibleText, TextListener
{
+ private static final long serialVersionUID = 3631432373506317811L;
+
// Constructor
// Adds a listener for tracking caret changes
public AccessibleAWTTextComponent()
Index: kaffe/libraries/javalib/java/awt/TextField.java
diff -u kaffe/libraries/javalib/java/awt/TextField.java:1.6 kaffe/libraries/javalib/java/awt/TextField.java:1.7
--- kaffe/libraries/javalib/java/awt/TextField.java:1.6 Mon Jul 4 00:06:07 2005
+++ kaffe/libraries/javalib/java/awt/TextField.java Wed Sep 21 15:07:59 2005
@@ -523,6 +523,8 @@
protected class AccessibleAWTTextField extends AccessibleAWTTextComponent
{
+ private static final long serialVersionUID = 6219164359235943158L;
+
protected AccessibleAWTTextField()
{
}
Index: kaffe/libraries/javalib/java/awt/Window.java
diff -u kaffe/libraries/javalib/java/awt/Window.java:1.40 kaffe/libraries/javalib/java/awt/Window.java:1.41
--- kaffe/libraries/javalib/java/awt/Window.java:1.40 Fri Sep 16 22:25:21 2005
+++ kaffe/libraries/javalib/java/awt/Window.java Wed Sep 21 15:08:00 2005
@@ -101,6 +101,8 @@
protected class AccessibleAWTWindow extends AccessibleAWTContainer
{
+ private static final long serialVersionUID = 4215068635060671780L;
+
public AccessibleRole getAccessibleRole()
{
return AccessibleRole.WINDOW;
Index: kaffe/libraries/javalib/java/text/DateFormat.java
diff -u kaffe/libraries/javalib/java/text/DateFormat.java:1.30 kaffe/libraries/javalib/java/text/DateFormat.java:1.31
--- kaffe/libraries/javalib/java/text/DateFormat.java:1.30 Sat Jul 30 16:39:20 2005
+++ kaffe/libraries/javalib/java/text/DateFormat.java Wed Sep 21 15:08:00 2005
@@ -58,6 +58,9 @@
public abstract class DateFormat extends Format implements Cloneable
{
+ private static final long serialVersionUID = 7218322306649953788L;
+
+ // Names fixed by serialization spec.
protected Calendar calendar;
protected NumberFormat numberFormat;
Index: kaffe/libraries/javalib/javax/print/DocFlavor.java
diff -u kaffe/libraries/javalib/javax/print/DocFlavor.java:1.4 kaffe/libraries/javalib/javax/print/DocFlavor.java:1.5
--- kaffe/libraries/javalib/javax/print/DocFlavor.java:1.4 Mon Jul 4 00:07:54 2005
+++ kaffe/libraries/javalib/javax/print/DocFlavor.java Wed Sep 21 15:08:00 2005
@@ -54,6 +54,8 @@
public static class BYTE_ARRAY
extends DocFlavor
{
+ private static final long serialVersionUID = -9065578006593857475L;
+
public static final BYTE_ARRAY AUTOSENSE = new BYTE_ARRAY("application/octet-stream");
public static final BYTE_ARRAY GIF = new BYTE_ARRAY("image/gif");
public static final BYTE_ARRAY JPEG = new BYTE_ARRAY("image/jpeg");
@@ -103,6 +105,8 @@
public static class INPUT_STREAM
extends DocFlavor
{
+ private static final long serialVersionUID = -7045842700749194127L;
+
public static final INPUT_STREAM AUTOSENSE = new INPUT_STREAM("application/octet-stream");
public static final INPUT_STREAM GIF = new INPUT_STREAM("image/gif");
public static final INPUT_STREAM JPEG = new INPUT_STREAM("image/jpeg");
Index: kaffe/libraries/javalib/javax/swing/JLayeredPane.java
diff -u kaffe/libraries/javalib/javax/swing/JLayeredPane.java:1.12 kaffe/libraries/javalib/javax/swing/JLayeredPane.java:1.13
--- kaffe/libraries/javalib/javax/swing/JLayeredPane.java:1.12 Wed Sep 14 22:19:51 2005
+++ kaffe/libraries/javalib/javax/swing/JLayeredPane.java Wed Sep 21 15:08:00 2005
@@ -40,6 +40,7 @@
import java.awt.Component;
import java.awt.Container;
+import java.awt.Graphics;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Map;
@@ -161,9 +162,9 @@
{
layers = new TreeMap ();
componentToLayer = new Hashtable ();
+ setLayout(null);
}
-
/**
* Looks up the layer a child component is currently assigned to.
*
@@ -572,26 +573,14 @@
*
* @param index the index of the child component to remove.
*/
- public void remove (int index)
+ public void remove(int index)
{
- Component c = getComponent (index);
- int layer = getLayer (c);
- decrLayer (new Integer(layer));
- componentToLayer.remove (c);
- super.remove (index);
+ Component c = getComponent(index);
+ int layer = getLayer(c);
+ decrLayer(new Integer(layer));
+ componentToLayer.remove(c);
+ super.remove(index);
revalidate();
- repaint();
- }
-
- /**
- * Removes a child from this container. The child is specified directly.
- * After removal, the child no longer occupies a layer.
- *
- * @param comp the child to remove.
- */
- public void remove (Component comp)
- {
- remove (getIndexOf (comp));
}
/**
@@ -679,5 +668,22 @@
if (accessibleContext == null)
accessibleContext = new AccessibleJLayeredPane();
return accessibleContext;
+ }
+
+ /**
+ * This method is overridden order to provide a reasonable painting
+ * mechanism for <code>JLayeredPane</code>. This is necessary since
+ * <code>JLayeredPane</code>'s do not have an own UI delegate.
+ *
+ * Basically this method clears the background for the
+ * <code>JLayeredPane</code> and then calls <code>super.paint(g)</code>.
+ *
+ * @param g the graphics context to use
+ */
+ public void paint(Graphics g)
+ {
+ g.setColor(getBackground());
+ g.fillRect(0, 0, getWidth(), getHeight());
+ super.paint(g);
}
}
Index: kaffe/libraries/javalib/javax/swing/JPopupMenu.java
diff -u kaffe/libraries/javalib/javax/swing/JPopupMenu.java:1.15 kaffe/libraries/javalib/javax/swing/JPopupMenu.java:1.16
--- kaffe/libraries/javalib/javax/swing/JPopupMenu.java:1.15 Wed Sep 14 22:19:51 2005
+++ kaffe/libraries/javalib/javax/swing/JPopupMenu.java Wed Sep 21 15:08:01 2005
@@ -582,7 +582,10 @@
if (fit)
popup = new MediumWeightPopup(this);
else
- popup = new HeavyWeightPopup(this);
+ {
+ popup = new HeavyWeightPopup(this);
+ setLightWeightPopupEnabled(false);
+ }
}
if (popup instanceof LightWeightPopup
|| popup instanceof MediumWeightPopup)
Index: kaffe/libraries/javalib/javax/swing/JRootPane.java
diff -u kaffe/libraries/javalib/javax/swing/JRootPane.java:1.15 kaffe/libraries/javalib/javax/swing/JRootPane.java:1.16
--- kaffe/libraries/javalib/javax/swing/JRootPane.java:1.15 Fri Sep 16 22:25:25 2005
+++ kaffe/libraries/javalib/javax/swing/JRootPane.java Wed Sep 21 15:08:01 2005
@@ -164,9 +164,17 @@
public void layoutContainer(Container c)
{
Dimension menuBarSize;
- Dimension containerSize = c.getSize(null);
+ int containerWidth = c.getBounds().width - getInsets().left
+ - getInsets().right;
+ int containerHeight = c.getBounds().height - getInsets().top
+ - getInsets().bottom;
Dimension contentPaneSize = getContentPane().getPreferredSize();
+ // 1. the glassPane fills entire viewable region (bounds - insets).
+ // 2. the layeredPane filles entire viewable region.
+ // 3. the menuBar is positioned at the upper edge of layeredPane.
+ // 4. the contentPane fills viewable region minus menuBar, if present.
+
/*
if size of top-level window wasn't set then just set
contentPane and menuBar to its preferred sizes.
@@ -189,7 +197,7 @@
+-------------------------------+
*/
- if (containerSize.width == 0 && containerSize.height == 0)
+ if (containerWidth == 0 && containerHeight == 0)
{
if (menuBar != null)
{
@@ -197,12 +205,12 @@
menuBarSize = menuBar.getPreferredSize();
maxWidth = Math.max(menuBarSize.width, contentPaneSize.width);
menuBar.setBounds(0, 0, maxWidth, menuBarSize.height);
- glassPane.setBounds(0, menuBarSize.height, maxWidth,
- contentPaneSize.height);
+ glassPane.setBounds(0, 0, maxWidth, menuBarSize.height
+ + contentPaneSize.height);
contentPane.setBounds(0, menuBarSize.height, maxWidth,
contentPaneSize.height);
- layeredPane.setSize(maxWidth,
- menuBarSize.height + contentPaneSize.height);
+ layeredPane.setBounds(0, 0, maxWidth, menuBarSize.height
+ + contentPaneSize.height);
}
else
{
@@ -210,7 +218,8 @@
contentPaneSize.height);
contentPane.setBounds(0, 0, contentPaneSize.width,
contentPaneSize.height);
- layeredPane.setSize(contentPaneSize.width, contentPaneSize.height);
+ layeredPane.setBounds(0, 0, contentPaneSize.width,
+ contentPaneSize.height);
}
}
else
@@ -218,25 +227,19 @@
if (menuBar != null)
{
menuBarSize = menuBar.getPreferredSize();
- if (menuBarSize.height > containerSize.height)
- menuBarSize.height = containerSize.height;
- menuBar.setBounds(0, 0, containerSize.width, menuBarSize.height);
- int remainingHeight = containerSize.height - menuBarSize.height;
- glassPane.setBounds(0, menuBarSize.height, containerSize.width,
- containerSize.height - menuBarSize.height);
- contentPane.setBounds(0, menuBarSize.height,
- containerSize.width,
- (containerSize.height - menuBarSize.height));
+ if (menuBarSize.height > containerHeight)
+ menuBarSize.height = containerHeight;
+ menuBar.setBounds(0, 0, containerWidth, menuBarSize.height);
+ glassPane.setBounds(0, 0, containerWidth, containerHeight);
+ contentPane.setBounds(0, menuBarSize.height, containerWidth,
+ (containerHeight - menuBarSize.height));
}
else
{
- glassPane.setBounds(0, 0, containerSize.width,
- containerSize.height);
- contentPane.setBounds(0, 0, containerSize.width,
- containerSize.height);
+ glassPane.setBounds(0, 0, containerWidth, containerHeight);
+ contentPane.setBounds(0, 0, containerWidth, containerHeight);
}
-
- layeredPane.setSize(containerSize.width, containerSize.height);
+ layeredPane.setBounds(0, 0, containerWidth, containerHeight);
}
}
@@ -537,7 +540,6 @@
{
JPanel p = new JPanel();
p.setName(this.getName() + ".glassPane");
- p.setLayout(new BorderLayout());
p.setVisible(false);
p.setOpaque(false);
return p;
Index: kaffe/libraries/javalib/javax/swing/JTable.java
diff -u kaffe/libraries/javalib/javax/swing/JTable.java:1.30 kaffe/libraries/javalib/javax/swing/JTable.java:1.31
--- kaffe/libraries/javalib/javax/swing/JTable.java:1.30 Wed Sep 14 22:19:51 2005
+++ kaffe/libraries/javalib/javax/swing/JTable.java Wed Sep 21 15:08:01 2005
@@ -2402,4 +2402,13 @@
return editor.getTableCellEditorComponent
(this, getValueAt(row, column), isCellSelected(row, column), row, column);
}
+
*** Patch too long, truncated ***
More information about the kaffe
mailing list