[kaffe] CVS kaffe (robilad): Resynced with GNU classpath: awt, swing, xml and cleanups
Kaffe CVS
cvs-commits at kaffe.org
Wed Sep 14 15:24:46 PDT 2005
PatchSet 6901
Date: 2005/09/14 22:19:44
Author: robilad
Branch: HEAD
Tag: (none)
Log:
Resynced with GNU classpath: awt, swing, xml and cleanups
Members:
ChangeLog:1.4422->1.4423
libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c:1.19->1.20
libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c:1.28->1.29
libraries/clib/awt/classpath-gtk/gtk-peer/gtkpeer.h:1.19->1.20
libraries/javalib/gnu/java/awt/AWTUtilities.java:1.2->1.3
libraries/javalib/gnu/java/nio/channels/FileChannelImpl.java:1.13->1.14
libraries/javalib/gnu/xml/dom/DomDocument.java:1.15->1.16
libraries/javalib/java/awt/Container.java:1.42->1.43
libraries/javalib/java/awt/event/InputEvent.java:1.11->1.12
libraries/javalib/java/awt/event/KeyEvent.java:1.13->1.14
libraries/javalib/java/awt/event/MouseEvent.java:1.14->1.15
libraries/javalib/java/lang/Double.java:1.23->1.24
libraries/javalib/java/lang/ThreadLocal.java:1.6->1.7
libraries/javalib/javax/security/auth/Subject.java:1.4->1.5
libraries/javalib/javax/security/auth/SubjectDomainCombiner.java:1.3->1.4
libraries/javalib/javax/swing/JCheckBox.java:1.7->1.8
libraries/javalib/javax/swing/JComponent.java:1.28->1.29
libraries/javalib/javax/swing/JLayeredPane.java:1.11->1.12
libraries/javalib/javax/swing/JPopupMenu.java:1.14->1.15
libraries/javalib/javax/swing/JScrollPane.java:1.17->1.18
libraries/javalib/javax/swing/JTable.java:1.29->1.30
libraries/javalib/javax/swing/JViewport.java:1.14->1.15
libraries/javalib/javax/swing/MenuSelectionManager.java:1.7->1.8
libraries/javalib/javax/swing/ScrollPaneLayout.java:1.9->1.10
libraries/javalib/javax/swing/ToolTipManager.java:1.10->1.11
libraries/javalib/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java:1.11->1.12
libraries/javalib/javax/swing/plaf/basic/BasicTableUI.java:1.15->1.16
libraries/javalib/javax/swing/plaf/basic/BasicToolBarUI.java:1.11->1.12
libraries/javalib/javax/swing/plaf/metal/MetalBorders.java:1.7->1.8
libraries/javalib/javax/swing/plaf/metal/MetalIconFactory.java:1.6->1.7
libraries/javalib/javax/swing/plaf/metal/MetalInternalFrameTitlePane.java:1.1->1.2
libraries/javalib/javax/swing/plaf/metal/MetalInternalFrameUI.java:1.4->1.5
libraries/javalib/javax/swing/plaf/metal/MetalLookAndFeel.java:1.21->1.22
libraries/javalib/javax/swing/table/TableColumn.java:1.9->1.10
libraries/javalib/javax/swing/tree/DefaultTreeCellEditor.java:1.8->1.9
libraries/javalib/org/ietf/jgss/GSSException.java:1.4->1.5
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4422 kaffe/ChangeLog:1.4423
--- kaffe/ChangeLog:1.4422 Wed Sep 14 20:47:55 2005
+++ kaffe/ChangeLog Wed Sep 14 22:19:44 2005
@@ -1,3 +1,247 @@
+2005-09-15 Dalibor Topic <robilad at kaffe.org>
+
+ Resynced with GNU Classpath.
+
+ 2005-09-12 Tom Tromey <tromey at redhat.com>
+
+ * java/lang/ThreadLocal.java: Organized imports.
+ * java/lang/Double.java: Organized imports.
+
+ 2005-09-12 Casey Marshall <csm at gnu.org>
+
+ PR 23819
+ * javax/security/auth/Subject.java (SecureSet.<init>): rename
+ input paremeter to 'inElements.'
+ (SecureSet.contains): return 'elements.contains,' not
+ 'elements.remove.'
+
+ PR 23822
+ * javax/security/auth/SubjectDomainCombiner.java
+ (combine): don't access 'subject' if null.
+
+ 2005-09-12 David Gilbert <david.gilbert at object-refinery.com>
+
+ * examples/gnu/classpath/examples/swing/Demo.java
+ (mkDesktopWorld): add palette style frame,
+ * javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
+ (closeIcon): new field,
+ (installListeners): call createPropertyChangeListener() to create the
+ new listener to allow for overriding,
+ (installDefaults): set the font in the title, read closeIcon from
+ defaults,
+ (uninstallDefaults): clear closeIcon,
+ (setButtonIcons): set icon for closeButton,
+ (paintComponent): set font for title,
+ * javax/swing/plaf/metal/MetalInternalFrameTitlePane.java
+ (MetalInternalFrameTitlePanePropertyChangeHandler): new support class,
+ (MetalTitlePaneLayout): likewise,
+ (paletteTitleHeight): initialise from defaults elsewhere,
+ (title): new private field,
+ (installDefaults): initialise various defaults,
+ (uninstallDefaults): clear defaults,
+ (addSubComponents): add sub-components used in this look and feel,
+ (createLayout): return new instance of MetalTitlePaneLayout,
+ (paintPalette): renders the title pane using the palette style,
+ (paintComponent): call paintPalette() if the internal frame uses the
+ palette style, otherwise handle painting without calling superclass
+ anymore,
+ (setPalette): update the icon visibility,
+ (createPropertyChangeListener): return a new change handler,
+ * javax/swing/plaf/metal/MetalInternalFrameUI.java
+ (IS_PALETTE): new static field,
+ (installUI): check IS_PALETTE property,
+ (createNorthPane): removed empty border,
+ (setPalette): update border as appropriate,
+ (paletteListener): new private field,
+ (installListeners): install a listener to handle changes in the
+ IS_PALETTE property,
+ (uninstallListeners): clear the listener from installListeners(),
+ * javax/swing/plaf/metal/MetalLookAndFeel.java
+ (initComponentDefaults): added defaults for 'DesktopIcon.border',
+ 'InternalFrame.paletteBorder', 'InternalFrame.paletteCloseIcon', and
+ 'InternalFrame.paletteTitleHeight'.
+
+
+ 2005-09-12 David Gilbert <david.gilbert at object-refinery.com>
+
+ * javax/swing/JComponent.java
+ (putClientProperty): fire property change event.
+
+ 2005-09-12 Anthony Balkissoon <abalkiss at redhat.com>
+
+ * javax/swing/JScrollPane.java:
+ (addNonNull): Changed from adding to container with no constraints to
+ adding to container with the appropriate ScrollPaneConstant as a
+ constraint. This avoids IllegalArgumentExceptions in ScrollPaneLayout.
+ (setColumnHeader): Added constraint to addNonNull call.
+ (setCorner): Likewise.
+ (setHorizontalScrollBar): Likewise.
+ (setRowHeader): Likewise.
+ (setVerticalScrollBar): Likewise.
+ (setViewport): Likewise.
+ * javax/swing/JViewport.java:
+ (setViewSize): Don't set the size or fireStateChanged unless the new
+ size is different from the old size.
+ (setView): Reset isViewSizeSet to false.
+ * javax/swing/ScrollPaneLayout:
+ (addSingletonComponent): Implemented and documented.
+ (addLayoutComponent): Throw an IllegalArgumentException if key is
+ not one of the appropriate ScrollPaneConstants constants. Added docs.
+ (setVerticalScrollBarPolicy): Likewise.
+ (setHorizontalScrollBarPolicy): Likewise.
+ (getCorner): Added docs.
+
+ 2005-09-12 Roman Kennke <kennke at aicas.com>
+
+ * javax/swing/JCheckBox.java
+ (AccessibleJCheckBox): New inner class.
+ (getAccessibleContext): Implemented this method.
+ * javax/swing/JLayeredPane.java
+ (AccessibleJLayeredPane): New inner class.
+ (getAccessibleContext): Implemented this method.
+
+ 2005-09-12 Roman Kennke <kennke at aicas.com>
+
+ * javax/swing/JTable.java
+ (getCellRect): Don't include cell gap in cell rectangle
+ calculation. It's already included in TableColumnModel.getWidth().
+ (createDefaultColumnsFromModel): Initialize table header values.
+ * javax/swing/plaf/basic/BasicTableUI.java
+ (paint): Don't include cell gap in cell rectangle
+ calculation. It's already included in TableColumnModel.getWidth().
+
+ 2005-09-12 Tom Tromey <tromey at redhat.com>
+
+ * org/ietf/jgss/GSSException.java (BAD_BINDINGS, BAD_MECH,
+ BAD_NAME, BAD_NAMETYPE, CONTEXT_EXPIRED, CREDENTIALS_EXPIRED,
+ DEFECTIVE_CREDENTIAL, DEFECTIVE_TOKEN, DUPLICATE_TOKEN, FAILURE,
+ NO_CONTEXT, NO_CRED, OLD_TOKEN): Use values from JDK, not RFC.
+
+ 2005-09-12 Lillian Angel <langel at redhat.com>
+
+ * javax/swing/tree/DefaultTreeCellEditor.java
+ (isCellEditable): Stopped the timer if it is started and
+ should not be restarted. This is a fix for the 'click-pause-
+ click' method to start editing.
+
+ 2005-09-12 Lillian Angel <langel at redhat.com>
+
+ * gnu/java/awt/AWTUtilities.java
+ (convertPoint): Added a check to determine if source and
+ destination components are showing.
+ * javax/swing/JPopupMenu.java
+ (setVisible): Added check to determine if component is showing.
+ (show): Likewise.
+ * javax/swing/MenuSelectionManager.java
+ (componentForPoint): Added check to determine if component is showing.
+ * javax/swing/ToolTipManager.java
+ (showTip): Added check to determine if component is showing.
+ * javax/swing/plaf/basic/BasicToolBarUI.java
+ (mousePressed): Added check to determine if component is showing.
+
+ 2005-09-12 David Gilbert <david.gilbert at object-refinery.com>
+
+ * javax/swing/plaf/metal/MetalIconFactory.java
+ (InternalFrameCloseIcon.paintIcon): change colors according to button
+ state,
+ (InternalFrameAltMaximizeIcon.paintIcon): likewise,
+ (InternalFrameMaximizeIcon.paintIcon): likewise,
+ (InternalFrameMinimizeIcon.paintIcon): likewise.
+
+ 2005-09-12 Roman Kennke <kennke at aicas.com>
+
+ * javax/swing/plaf/metal/MetalBorders.java
+ (TableHeaderBorder): New inner class.
+ (TextFieldBorder.paintBorder): Only paint the active border
+ if the text field is enabled _and_ editable.
+ * javax/swing/plaf/metal/MetalLookAndFeel.java
+ (initComponentDefaults): Added default to use the new
+ TableHeaderBorder for table headers.
+
+ 2005-09-12 Anthony Balkissoon <abalkiss at redhat.com>
+
+ * java/awt/Container.java:
+ (findComponentForMouseEventAt): Reduced visibility to package-private.
+ (getDeepestComponentForMouseEventAt): Reduced visibility to
+ package-private and removed static modifier.
+
+ 2005-09-12 David Gilbert <david.gilbert at object-refinery.com>
+
+ * javax/swing/plaf/metal/MetalBorders.java
+ (desktopIconBorder): new private field,
+ (DesktopIconBorder): new support class,
+ (getDesktopIconBorder): implemented,
+ (InternalFrameBorder.paintBorder): change color of line highlights if
+ the internal frame is selected.
+
+ 2005-09-12 Chris Burdess <dog at gnu.org>
+
+ * gnu/xml/dom/DomDocument.java: Implementation of xml:id W3C
+ Recommendation.
+
+ 2005-09-12 Roman Kennke <kennke at aicas.com>
+
+ * javax/swing/JTable.java
+ (TableColumnPropertyChangeHandler): New inner class. Handles
+ changes of column widths.
+ (JTable(TableModel, TableColumnModel, ListSelectionModel)):
+ Check if column model == null and if so, create a default model.
+ (initializeLocalVars): Changed to use createDefaultColumnsFromModel
+ instead of createColumnsFromModel.
+ (addColumn): Add property change handler to new column.
+ (createColumnsFromModel): Removed redundant private method.
+ Use the public createDefaultColumnsFromModel instead.
+ (tableChanged): Use createDefaultColumnsFromModel instead of
+ createColumnsFromModel.
+ (setModel): Use createDefaultColumnsFromModel instead of
+ createColumnsFromModel.
+ (doLayout): When handling AUTO_RESIZE_OFF, then adjust the
+ size of the resizing column to it's (new) preferred size.
+ (createDefaultColumnsFromModel): Added assertion to make sure
+ that the column model is not null. Add property change handler
+ to new columns.
+ * javax/swing/table/TableColumn.java
+ (setWidth): Fire property change with name 'width' instead
+ of using the (obsolete) constant field COLUMN_WIDTH_PROPERTY.
+ (setPreferredWidth): Make this property a bound property.
+
+ 2005-09-11 Thomas Fitzsimmons <fitzsim at redhat.com>
+
+ PR swing/22922
+ * java/awt/event/InputEvent.java (modifiersEx): New field.
+ (InputEvent): Assume modifiers parameter contains both new- and
+ old-style masks.
+ (isShiftDown): Check modifiers for old-style shift mask and
+ modifiersEx for new-style shift mask.
+ (isControlDown): Likewise for control mask.
+ (isMetaDown): Likewise for meta mask.
+ (isAltDown): Likewise for alt mask.
+ (isAltGraphDown): Likewise for alt-graph mask.
+ (getModifiers): Return value of modifiers field.
+ (getModifiersEx): Return value of modifiersEx field.
+ * java/awt/event/MouseEvent.java
+ (MouseEvent(Component,int,long,int,int,int,int,boolean,int)):
+ Clear button new-style mask for mouse released events.
+ (paramString): Remove old-style modifier handling.
+ (readObject): Extend modifiers and assign to modifiersEx.
+ * java/awt/event/KeyEvent.java (readObject): Extend modifiers and
+ assign to modifiersEx.
+ * native/jni/gtk-peer/gtkpeer.h: Define macros for new-style mouse
+ masks. Define macros for old-style key masks.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c:
+ Remove macros for old-style key masks.
+ (button_to_awt_mods): Always return bitwise OR of new- and
+ old-style modifiers.
+ (cp_gtk_state_to_awt_mods): Likewise.
+ (state_to_awt_mods_with_button_states): Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
+ (keyevent_state_to_awt_mods): Likewise.
+
+ 2005-09-11 Mark Wielaard <mark at klomp.org>
+
+ * gnu/java/nio/channels/FileChannelImpl.java (finalize): Check whether
+ fd != -1 before calling close().
+
2005-09-14 David Walluck <walluck at mandrake.org>
* kaffe/include/kaffe_jni.h: (vfprintf)
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.19 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.19 Thu Aug 25 22:25:11 2005
+++ kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c Wed Sep 14 22:19:46 2005
@@ -56,10 +56,6 @@
#define AWT_HAND_CURSOR 12
#define AWT_MOVE_CURSOR 13
-#define AWT_BUTTON1_DOWN_MASK (1 << 10)
-#define AWT_BUTTON2_DOWN_MASK (1 << 11)
-#define AWT_BUTTON3_DOWN_MASK (1 << 12)
-
/* FIXME: use gtk-double-click-time, gtk-double-click-distance */
#define MULTI_CLICK_TIME 250
/* as opposed to a MULTI_PASS_TIME :) */
@@ -135,11 +131,11 @@
switch (button)
{
case 1:
- return AWT_BUTTON1_MASK;
+ return AWT_BUTTON1_DOWN_MASK | AWT_BUTTON1_MASK;
case 2:
- return AWT_BUTTON2_MASK;
+ return AWT_BUTTON2_DOWN_MASK | AWT_BUTTON2_MASK;
case 3:
- return AWT_BUTTON3_MASK;
+ return AWT_BUTTON3_DOWN_MASK | AWT_BUTTON3_MASK;
}
return 0;
@@ -151,11 +147,11 @@
jint result = 0;
if (state & GDK_SHIFT_MASK)
- result |= AWT_SHIFT_DOWN_MASK;
+ result |= (AWT_SHIFT_DOWN_MASK | AWT_SHIFT_MASK);
if (state & GDK_CONTROL_MASK)
- result |= AWT_CTRL_DOWN_MASK;
+ result |= (AWT_CTRL_DOWN_MASK | AWT_CTRL_MASK);
if (state & GDK_MOD1_MASK)
- result |= AWT_ALT_DOWN_MASK;
+ result |= (AWT_ALT_DOWN_MASK | AWT_ALT_MASK);
return result;
}
@@ -166,13 +162,13 @@
jint result = 0;
if (state & GDK_SHIFT_MASK)
- result |= AWT_SHIFT_DOWN_MASK;
+ result |= AWT_SHIFT_DOWN_MASK | AWT_SHIFT_MASK;
if (state & GDK_CONTROL_MASK)
- result |= AWT_CTRL_DOWN_MASK;
+ result |= AWT_CTRL_DOWN_MASK | AWT_CTRL_MASK;
if (state & GDK_MOD1_MASK)
- result |= AWT_ALT_DOWN_MASK;
+ result |= AWT_ALT_DOWN_MASK | AWT_ALT_MASK;
if (state & GDK_BUTTON1_MASK)
- result |= AWT_BUTTON1_DOWN_MASK;
+ result |= AWT_BUTTON1_DOWN_MASK | AWT_BUTTON1_MASK;
if (state & GDK_BUTTON2_MASK)
result |= AWT_BUTTON2_DOWN_MASK;
if (state & GDK_BUTTON3_MASK)
Index: kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
diff -u kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c:1.28 kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c:1.29
--- kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c:1.28 Sun Sep 11 21:16:46 2005
+++ kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c Wed Sep 14 22:19:46 2005
@@ -952,29 +952,29 @@
if (event->keyval == GDK_Shift_L
|| event->keyval == GDK_Shift_R)
- result |= AWT_SHIFT_DOWN_MASK;
+ result |= AWT_SHIFT_DOWN_MASK | AWT_SHIFT_MASK;
else
{
if (state & GDK_SHIFT_MASK)
- result |= AWT_SHIFT_DOWN_MASK;
+ result |= AWT_SHIFT_DOWN_MASK | AWT_SHIFT_MASK;
}
if (event->keyval == GDK_Control_L
|| event->keyval == GDK_Control_R)
- result |= AWT_CTRL_DOWN_MASK;
+ result |= AWT_CTRL_DOWN_MASK | AWT_CTRL_MASK;
else
{
if (state & GDK_CONTROL_MASK)
- result |= AWT_CTRL_DOWN_MASK;
+ result |= AWT_CTRL_DOWN_MASK | AWT_CTRL_MASK;
}
if (event->keyval == GDK_Alt_L
|| event->keyval == GDK_Alt_R)
- result |= AWT_ALT_DOWN_MASK;
+ result |= AWT_ALT_DOWN_MASK | AWT_ALT_MASK;
else
{
if (state & GDK_MOD1_MASK)
- result |= AWT_ALT_DOWN_MASK;
+ result |= AWT_ALT_DOWN_MASK | AWT_ALT_MASK;
}
}
else if (event->type == GDK_KEY_RELEASE)
@@ -985,20 +985,20 @@
&& event->keyval != GDK_Shift_R)
{
if (state & GDK_SHIFT_MASK)
- result |= AWT_SHIFT_DOWN_MASK;
+ result |= AWT_SHIFT_DOWN_MASK | AWT_SHIFT_MASK;
}
if (event->keyval != GDK_Control_L
&& event->keyval != GDK_Control_R)
{
if (state & GDK_CONTROL_MASK)
- result |= AWT_CTRL_DOWN_MASK;
+ result |= AWT_CTRL_DOWN_MASK | AWT_CTRL_MASK;
}
if (event->keyval != GDK_Alt_L
&& event->keyval != GDK_Alt_R)
{
if (state & GDK_MOD1_MASK)
- result |= AWT_ALT_DOWN_MASK;
+ result |= AWT_ALT_DOWN_MASK | AWT_ALT_MASK;
}
}
Index: kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gtkpeer.h
diff -u kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gtkpeer.h:1.19 kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gtkpeer.h:1.20
--- kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gtkpeer.h:1.19 Sun Sep 11 21:16:46 2005
+++ kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gtkpeer.h Wed Sep 14 22:19:46 2005
@@ -111,14 +111,25 @@
jint x_offset, y_offset;
};
+/* New-style event masks. */
+#define AWT_BUTTON1_DOWN_MASK (1 << 10)
+#define AWT_BUTTON2_DOWN_MASK (1 << 11)
+#define AWT_BUTTON3_DOWN_MASK (1 << 12)
+
#define AWT_SHIFT_DOWN_MASK (1 << 6)
#define AWT_CTRL_DOWN_MASK (1 << 7)
#define AWT_META_DOWN_MASK (1 << 8)
#define AWT_ALT_DOWN_MASK (1 << 9)
+/* Old-style event masks. */
#define AWT_BUTTON1_MASK (1 << 4)
#define AWT_BUTTON2_MASK (1 << 3)
#define AWT_BUTTON3_MASK (1 << 2)
+
+#define AWT_SHIFT_MASK (1 << 0)
+#define AWT_CTRL_MASK (1 << 1)
+#define AWT_META_MASK (1 << 2)
+#define AWT_ALT_MASK (1 << 3)
#define AWT_ITEM_SELECTED 1
#define AWT_ITEM_DESELECTED 2
Index: kaffe/libraries/javalib/gnu/java/awt/AWTUtilities.java
diff -u kaffe/libraries/javalib/gnu/java/awt/AWTUtilities.java:1.2 kaffe/libraries/javalib/gnu/java/awt/AWTUtilities.java:1.3
--- kaffe/libraries/javalib/gnu/java/awt/AWTUtilities.java:1.2 Sat Jul 30 16:39:12 2005
+++ kaffe/libraries/javalib/gnu/java/awt/AWTUtilities.java Wed Sep 14 22:19:47 2005
@@ -592,9 +592,12 @@
if (destination == null)
destination = getRoot(source);
-
- convertPointToScreen(pt, source);
- convertPointFromScreen(pt, destination);
+
+ if (source.isShowing() && destination.isShowing())
+ {
+ convertPointToScreen(pt, source);
+ convertPointFromScreen(pt, destination);
+ }
return pt;
}
Index: kaffe/libraries/javalib/gnu/java/nio/channels/FileChannelImpl.java
diff -u kaffe/libraries/javalib/gnu/java/nio/channels/FileChannelImpl.java:1.13 kaffe/libraries/javalib/gnu/java/nio/channels/FileChannelImpl.java:1.14
--- kaffe/libraries/javalib/gnu/java/nio/channels/FileChannelImpl.java:1.13 Sat Jul 30 16:39:14 2005
+++ kaffe/libraries/javalib/gnu/java/nio/channels/FileChannelImpl.java Wed Sep 14 22:19:49 2005
@@ -175,7 +175,8 @@
*/
protected void finalize() throws IOException
{
- this.close();
+ if (fd != -1)
+ close();
}
public int read (ByteBuffer dst) throws IOException
Index: kaffe/libraries/javalib/gnu/xml/dom/DomDocument.java
diff -u kaffe/libraries/javalib/gnu/xml/dom/DomDocument.java:1.15 kaffe/libraries/javalib/gnu/xml/dom/DomDocument.java:1.16
--- kaffe/libraries/javalib/gnu/xml/dom/DomDocument.java:1.15 Tue Jul 12 12:50:29 2005
+++ kaffe/libraries/javalib/gnu/xml/dom/DomDocument.java Wed Sep 14 22:19:49 2005
@@ -210,13 +210,15 @@
*/
public Element getElementById(String id)
{
- DomDoctype doctype = (DomDoctype) getDoctype();
-
- if (doctype == null || !doctype.hasIds()
- || id == null || id.length() == 0)
+ if (id == null || id.length() == 0)
{
return null;
}
+ DomDoctype doctype = (DomDoctype) getDoctype();
+ if (doctype != null && !doctype.hasIds())
+ {
+ doctype = null;
+ }
// yes, this is linear in size of document.
// it'd be easy enough to maintain a hashtable.
@@ -233,24 +235,38 @@
if (current.getNodeType() == ELEMENT_NODE)
{
DomElement element = (DomElement) current;
- DTDElementTypeInfo info =
- doctype.getElementTypeInfo(current.getNodeName());
- if (info != null &&
- id.equals(element.getAttribute(info.idAttrName)))
- {
- return element;
- }
- else if (element.userIdAttrs != null)
+ if (doctype != null)
{
- for (Iterator i = element.userIdAttrs.iterator();
- i.hasNext(); )
+ DTDElementTypeInfo info =
+ doctype.getElementTypeInfo(current.getNodeName());
+ if (info != null &&
+ id.equals(element.getAttribute(info.idAttrName)))
{
- Node idAttr = (Node) i.next();
- if (id.equals(idAttr.getNodeValue()))
+ return element;
+ }
+ else if (element.userIdAttrs != null)
+ {
+ for (Iterator i = element.userIdAttrs.iterator();
+ i.hasNext(); )
{
- return element;
+ Node idAttr = (Node) i.next();
+ if (id.equals(idAttr.getNodeValue()))
+ {
+ return element;
+ }
}
}
+ }
+ // xml:id
+ String xmlId = element.getAttribute("xml:id");
+ if (xmlId == null)
+ {
+ xmlId = element.getAttributeNS(XMLConstants.XML_NS_URI,
+ "id");
+ }
+ if (id.equals(xmlId))
+ {
+ return element;
}
}
Index: kaffe/libraries/javalib/java/awt/Container.java
diff -u kaffe/libraries/javalib/java/awt/Container.java:1.42 kaffe/libraries/javalib/java/awt/Container.java:1.43
--- kaffe/libraries/javalib/java/awt/Container.java:1.42 Sun Sep 11 21:16:58 2005
+++ kaffe/libraries/javalib/java/awt/Container.java Wed Sep 14 22:19:49 2005
@@ -1060,7 +1060,7 @@
* otherwise the top-most component (out of this container itself and
* its descendants) meeting the criteria above.
*/
- public Component findComponentForMouseEventAt(int x, int y)
+ Component findComponentForMouseEventAt(int x, int y)
{
synchronized (getTreeLock())
{
@@ -2013,7 +2013,7 @@
* location, otherwise the appropriate component from the conditions
* above.
*/
- public static Component getDeepestComponentForMouseEventAt (
+ Component getDeepestComponentForMouseEventAt (
Component parent, int x, int y)
{
if (parent == null || (! parent.contains(x, y)))
Index: kaffe/libraries/javalib/java/awt/event/InputEvent.java
diff -u kaffe/libraries/javalib/java/awt/event/InputEvent.java:1.11 kaffe/libraries/javalib/java/awt/event/InputEvent.java:1.12
--- kaffe/libraries/javalib/java/awt/event/InputEvent.java:1.11 Mon Jul 4 00:06:12 2005
+++ kaffe/libraries/javalib/java/awt/event/InputEvent.java Wed Sep 14 22:19:50 2005
@@ -197,17 +197,28 @@
private final long when;
/**
- * The modifiers in effect for this event. Package visible for use by
- * subclasses. The old style (bitmask 0x3f) should not be mixed with the
- * new style (bitmasks 0xffffffc0).
+ * The old-style modifiers in effect for this event. Package visible
+ * for use by subclasses. The old style (bitmask 0x3f) should not be
+ * mixed with the new style (bitmasks 0xffffffc0).
*
* @see #getModifiers()
* @see MouseEvent
- * @serial the modifier state, stored in the new style
+ * @serial the modifier state, stored in the old style
*/
int modifiers;
/**
+ * The new-style modifiers in effect for this event. Package visible
+ * for use by subclasses. The old style (bitmask 0x3f) should not be
+ * mixed with the new style (bitmasks 0xffffffc0).
+ *
+ * @see #getModifiersEx()
+ * @see MouseEvent
+ * @serial the modifier state, stored in the new style
+ */
+ int modifiersEx;
+
+ /**
* Initializes a new instance of <code>InputEvent</code> with the specified
* source, id, timestamp, and modifiers. Note that an invalid id leads to
* unspecified results.
@@ -222,7 +233,8 @@
{
super(source, id);
this.when = when;
- this.modifiers = EventModifier.extend(modifiers);
+ this.modifiers = modifiers & EventModifier.OLD_MASK;
+ this.modifiersEx = modifiers & EventModifier.NEW_MASK;
}
/**
@@ -232,7 +244,8 @@
*/
public boolean isShiftDown()
{
- return (modifiers & SHIFT_DOWN_MASK) != 0;
+ return ((modifiers & SHIFT_MASK) != 0)
+ || ((modifiersEx & SHIFT_DOWN_MASK) != 0);
}
/**
@@ -243,7 +256,8 @@
*/
public boolean isControlDown()
{
- return (modifiers & CTRL_DOWN_MASK) != 0;
+ return ((modifiers & CTRL_MASK) != 0)
+ || ((modifiersEx & CTRL_DOWN_MASK) != 0);
}
/**
@@ -253,7 +267,8 @@
*/
public boolean isMetaDown()
{
- return (modifiers & META_DOWN_MASK) != 0;
+ return ((modifiers & META_MASK) != 0)
+ || ((modifiersEx & META_DOWN_MASK) != 0);
}
/**
@@ -263,7 +278,8 @@
*/
public boolean isAltDown()
{
- return (modifiers & ALT_DOWN_MASK) != 0;
+ return ((modifiers & ALT_MASK) != 0)
+ || ((modifiersEx & ALT_DOWN_MASK) != 0);
}
/**
@@ -274,7 +290,8 @@
*/
public boolean isAltGraphDown()
{
- return (modifiers & ALT_GRAPH_DOWN_MASK) != 0;
+ return ((modifiers & ALT_GRAPH_MASK) != 0)
+ || ((modifiersEx & ALT_GRAPH_DOWN_MASK) != 0);
}
/**
@@ -300,7 +317,7 @@
*/
public int getModifiers()
{
- return EventModifier.revert(modifiers);
+ return modifiers;
}
/**
@@ -321,7 +338,7 @@
*/
public int getModifiersEx()
{
- return modifiers;
+ return modifiersEx;
}
/**
Index: kaffe/libraries/javalib/java/awt/event/KeyEvent.java
diff -u kaffe/libraries/javalib/java/awt/event/KeyEvent.java:1.13 kaffe/libraries/javalib/java/awt/event/KeyEvent.java:1.14
--- kaffe/libraries/javalib/java/awt/event/KeyEvent.java:1.13 Mon Jul 4 00:06:13 2005
+++ kaffe/libraries/javalib/java/awt/event/KeyEvent.java Wed Sep 14 22:19:50 2005
@@ -1735,6 +1735,6 @@
throws IOException, ClassNotFoundException
{
s.defaultReadObject();
- modifiers = EventModifier.extend(modifiers);
+ modifiersEx = EventModifier.extend(modifiers) & EventModifier.NEW_MASK;
}
} // class KeyEvent
Index: kaffe/libraries/javalib/java/awt/event/MouseEvent.java
diff -u kaffe/libraries/javalib/java/awt/event/MouseEvent.java:1.14 kaffe/libraries/javalib/java/awt/event/MouseEvent.java:1.15
--- kaffe/libraries/javalib/java/awt/event/MouseEvent.java:1.14 Mon Jul 4 00:06:14 2005
+++ kaffe/libraries/javalib/java/awt/event/MouseEvent.java Wed Sep 14 22:19:50 2005
@@ -227,6 +227,12 @@
else if ((modifiers & BUTTON3_MASK) != 0)
this.button = BUTTON3;
}
+ // clear the mouse button modifier masks if this is a button
+ // release event.
+ if (id == MOUSE_RELEASED)
+ this.modifiersEx &= ~(BUTTON1_DOWN_MASK
+ | BUTTON2_DOWN_MASK
+ | BUTTON3_DOWN_MASK);
}
/**
@@ -392,17 +398,9 @@
s.append("unknown type,(");
}
s.append(x).append(',').append(y).append("),button=").append(button);
- if ((modifiers & EventModifier.NEW_MASK) != 0)
- {
- int mod = modifiers;
- if ((mod & (ALT_DOWN_MASK | BUTTON2_DOWN_MASK)) != 0)
- mod |= ALT_DOWN_MASK | BUTTON2_DOWN_MASK;
- if ((mod & (META_DOWN_MASK | BUTTON3_DOWN_MASK)) != 0)
- mod |= META_DOWN_MASK | BUTTON3_DOWN_MASK;
- s.append(",modifiers=").append(getModifiersExText(mod));
- }
- if (modifiers != 0)
- s.append(",extModifiers=").append(getModifiersExText(modifiers));
+ // FIXME: need a mauve test for this method
+ if (modifiersEx != 0)
+ s.append(",extModifiers=").append(getModifiersExText(modifiersEx));
return s.append(",clickCount=").append(clickCount).toString();
}
@@ -426,7 +424,7 @@
button = BUTTON2;
else if ((modifiers & BUTTON3_MASK) != 0)
button = BUTTON3;
- modifiers = EventModifier.extend(modifiers);
+ modifiersEx = EventModifier.extend(modifiers) & EventModifier.NEW_MASK;
}
}
} // class MouseEvent
Index: kaffe/libraries/javalib/java/lang/Double.java
diff -u kaffe/libraries/javalib/java/lang/Double.java:1.23 kaffe/libraries/javalib/java/lang/Double.java:1.24
--- kaffe/libraries/javalib/java/lang/Double.java:1.23 Mon Jul 4 00:06:44 2005
+++ kaffe/libraries/javalib/java/lang/Double.java Wed Sep 14 22:19:50 2005
@@ -38,7 +38,6 @@
package java.lang;
-import gnu.classpath.Configuration;
/**
* Instances of class <code>Double</code> represent primitive
Index: kaffe/libraries/javalib/java/lang/ThreadLocal.java
diff -u kaffe/libraries/javalib/java/lang/ThreadLocal.java:1.6 kaffe/libraries/javalib/java/lang/ThreadLocal.java:1.7
--- kaffe/libraries/javalib/java/lang/ThreadLocal.java:1.6 Mon Jul 4 00:06:48 2005
+++ kaffe/libraries/javalib/java/lang/ThreadLocal.java Wed Sep 14 22:19:50 2005
@@ -38,7 +38,6 @@
package java.lang;
import java.util.Map;
-import java.util.WeakHashMap;
/**
Index: kaffe/libraries/javalib/javax/security/auth/Subject.java
diff -u kaffe/libraries/javalib/javax/security/auth/Subject.java:1.4 kaffe/libraries/javalib/javax/security/auth/Subject.java:1.5
--- kaffe/libraries/javalib/javax/security/auth/Subject.java:1.4 Mon Jul 4 00:08:00 2005
+++ kaffe/libraries/javalib/javax/security/auth/Subject.java Wed Sep 14 22:19:51 2005
@@ -1,5 +1,5 @@
/* Subject.java -- a single entity in the system.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -385,19 +385,19 @@
// Constructors.
// -----------------------------------------------------------------------
- SecureSet (final Subject subject, final int type, final Collection elements)
+ SecureSet (final Subject subject, final int type, final Collection inElements)
{
this (subject, type);
- for (Iterator it = elements.iterator(); it.hasNext(); )
+ for (Iterator it = inElements.iterator(); it.hasNext(); )
{
Object o = it.next();
if (type == PRINCIPALS && !(o instanceof Principal))
{
throw new IllegalArgumentException(o+" is not a Principal");
}
- if (!elements.contains (o))
+ if (!this.elements.contains (o))
{
- elements.add (o);
+ this.elements.add (o);
}
}
}
@@ -511,7 +511,7 @@
public synchronized boolean contains (final Object element)
{
- return elements.remove (element);
+ return elements.contains (element);
}
public boolean removeAll (final Collection c)
Index: kaffe/libraries/javalib/javax/security/auth/SubjectDomainCombiner.java
diff -u kaffe/libraries/javalib/javax/security/auth/SubjectDomainCombiner.java:1.3 kaffe/libraries/javalib/javax/security/auth/SubjectDomainCombiner.java:1.4
--- kaffe/libraries/javalib/javax/security/auth/SubjectDomainCombiner.java:1.3 Mon Jul 4 00:08:00 2005
+++ kaffe/libraries/javalib/javax/security/auth/SubjectDomainCombiner.java Wed Sep 14 22:19:51 2005
@@ -1,5 +1,5 @@
/* SubjectDomainCombiner.java -- domain combiner for Subjects.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -67,8 +67,9 @@
final ProtectionDomain[] assigned)
{
LinkedList domains = new LinkedList();
- Principal[] principals =
- (Principal[]) subject.getPrincipals().toArray (new Principal[0]);
+ Principal[] principals = null;
+ if (subject != null)
+ principals = (Principal[]) subject.getPrincipals().toArray (new Principal[0]);
if (current != null)
{
for (int i = 0; i < current.length; i++)
Index: kaffe/libraries/javalib/javax/swing/JCheckBox.java
diff -u kaffe/libraries/javalib/javax/swing/JCheckBox.java:1.7 kaffe/libraries/javalib/javax/swing/JCheckBox.java:1.8
--- kaffe/libraries/javalib/javax/swing/JCheckBox.java:1.7 Sat Jul 30 16:39:25 2005
+++ kaffe/libraries/javalib/javax/swing/JCheckBox.java Wed Sep 14 22:19:51 2005
@@ -38,7 +38,9 @@
package javax.swing;
+import javax.accessibility.Accessible;
import javax.accessibility.AccessibleContext;
+import javax.accessibility.AccessibleRole;
/**
* A small box that displays a check or not, depending on it's
@@ -54,8 +56,32 @@
*
* @author Ronald Veldema (rveldema at cs.vu.nl)
*/
-public class JCheckBox extends JToggleButton
+public class JCheckBox extends JToggleButton implements Accessible
{
+
+ /**
+ * Provides accessibility support for <code>JCheckBox</code>.
+ */
+ protected class AccessibleJCheckBox extends AccessibleJToggleButton
+ {
+ /**
+ * Creates a new instance of <code>AccessibleJCheckBox</code>.
+ */
+ public AccessibleJCheckBox()
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Returns the accessble role of <code>JCheckBox</code>,
+ * {@link AccessibleRole#CHECK_BOX}.
+ */
+ public AccessibleRole getAccessibleRole()
+ {
+ return AccessibleRole.CHECK_BOX;
+ }
+ }
+
private static final long serialVersionUID = -5246739313864538930L;
public static final String BORDER_PAINTED_FLAT_CHANGED_PROPERTY =
@@ -118,14 +144,6 @@
}
/**
- * Gets the AccessibleContext associated with this JCheckBox.
- */
- public AccessibleContext getAccessibleContext()
- {
- return null;
- }
-
- /**
* Returns a string that specifies the name of the Look and Feel class
* that renders this component.
*/
@@ -148,5 +166,17 @@
{
firePropertyChange("borderPaintedFlat", borderPaintedFlat, newValue);
borderPaintedFlat = newValue;
+ }
+
+ /**
+ * Returns the accessible context for this <code>JCheckBox</code>.
+ *
+ * @return the accessible context for this <code>JCheckBox</code>
+ */
+ public AccessibleContext getAccessibleContext()
+ {
+ if (accessibleContext == null)
+ accessibleContext = new AccessibleJCheckBox();
+ return accessibleContext;
}
}
Index: kaffe/libraries/javalib/javax/swing/JComponent.java
diff -u kaffe/libraries/javalib/javax/swing/JComponent.java:1.28 kaffe/libraries/javalib/javax/swing/JComponent.java:1.29
--- kaffe/libraries/javalib/javax/swing/JComponent.java:1.28 Wed Aug 17 22:38:33 2005
+++ kaffe/libraries/javalib/javax/swing/JComponent.java Wed Sep 14 22:19:51 2005
@@ -452,7 +452,9 @@
/**
* Add a client property <code>value</code> to this component, associated
* with <code>key</code>. If there is an existing client property
- * associated with <code>key</code>, it will be replaced.
+ * associated with <code>key</code>, it will be replaced. A
+ * {@link PropertyChangeEvent} is sent to registered listeners (with the
+ * name of the property being <code>key.toString()</code>).
*
* @param key The key of the client property association to add
* @param value The value of the client property association to add
@@ -463,10 +465,13 @@
*/
public final void putClientProperty(Object key, Object value)
{
+ Hashtable t = getClientProperties();
+ Object old = t.get(key);
if (value != null)
- getClientProperties().put(key, value);
+ t.put(key, value);
else
- getClientProperties().remove(key);
+ t.remove(key);
+ firePropertyChange(key.toString(), old, value);
}
/**
Index: kaffe/libraries/javalib/javax/swing/JLayeredPane.java
diff -u kaffe/libraries/javalib/javax/swing/JLayeredPane.java:1.11 kaffe/libraries/javalib/javax/swing/JLayeredPane.java:1.12
--- kaffe/libraries/javalib/javax/swing/JLayeredPane.java:1.11 Sat Jul 30 16:39:25 2005
+++ kaffe/libraries/javalib/javax/swing/JLayeredPane.java Wed Sep 14 22:19:51 2005
@@ -46,6 +46,8 @@
import java.util.TreeMap;
import javax.accessibility.Accessible;
+import javax.accessibility.AccessibleContext;
+import javax.accessibility.AccessibleRole;
/**
* A container that adds depth to the usual <code>Container</code> semantics.
@@ -116,6 +118,30 @@
*/
public class JLayeredPane extends JComponent implements Accessible
{
+
+ /**
+ * Provides accessibility support for <code>JLayeredPane</code>.
+ */
+ protected class AccessibleJLayeredPane extends AccessibleJComponent
+ {
+ /**
+ * Creates a new instance of <code>AccessibleJLayeredPane</code>.
+ */
+ public AccessibleJLayeredPane()
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Returns the accessble role of <code>JLayeredPane</code>,
+ * {@link AccessibleRole#LAYERED_PANE}.
+ */
+ public AccessibleRole getAccessibleRole()
*** Patch too long, truncated ***
More information about the kaffe
mailing list