Commit Graph

1654 Commits

Author SHA1 Message Date
Anthony Green b29610b3cf de-pessimization
From-SVN: r78447
2004-02-25 19:52:58 +00:00
Per Bothner 35d0b14df6 ByteBuffer.java (endian): Make non-private so other java.nio classes can inherit it.
* java/nio/ByteBuffer.java (endian):  Make non-private so other
	java.nio classes can inherit it.
	(<init>):  Don't bother clearing array_offset.
	* java/nio/ByteBuffer.java (allocate):  Re-implement using wrap.
	* java/nio/ByteBuffer.java (get(byte[],int,int)):  Check underflow.
	Remove redundant test.

	* java/nio/ByteBufferImpl.java (asCharBuffer, asShortBuffer,
	asIntBuffer, asLongBuffer, asFloatBuffer, asDoubleBuffer):
	Use new XxxViewBufferImpl constructors.
	* java/nio/MappedByteBufferImpl.java:  Likewise.
	* java/nio/DirectByteBufferImpl.java:  Likewise.

	* java/nio/ByteBufferImpl.java:  Remove one constructor.
	Inline super in remaining constructor.
	* java/nio/ByteBuffer.java:  Remove unused constructor.

	* java/nio/ByteBufferImpl.java (shiftDown):  New optimized method.

	* java/nio/ByteBufferImpl.java (get, put):  Add array_offset.
	* java/nio/DirectByteBufferImpl.java (owner):  New field.
	(offset):  Remove unused field.
	(<init>):  Modify one and add another constructor.  Change callers.
	(allocateDirect):  Removed - not used.
	(getImpl, putImpl):  Make static and pass address explicitly,
	to make them useful for MappedByteBufferImpl.
	(get, put):  Check for underflow.  Modify for new getImpl.
	(getImpl):  New native method where target is array.
	(get(byte[],int,int)):  Use the above.
	(adjustAddress):  New static native method.
	(slice, duplicate, asReadOnly):  New implementations.
	* java/nio/natDirectByteBufferImpl.cc (getImpl, putImpl, shiftDown,
	adjustAddress):  New or updated native methods.

From-SVN: r77919
2004-02-16 12:00:33 -08:00
Per Bothner 5693912a7d CharViewBufferImpl.java: New convenience constructor.
* java/nio/CharViewBufferImpl.java:  New convenience constructor.
	Fix buggy call to super constructor.
	* java/nio/DoubleViewBufferImpl.java:  Likewise.
	* java/nio/FloatViewBufferImpl.java:  Likewise.
	* java/nio/IntViewBufferImpl.java:  Likewise.
	* java/nio/LongViewBufferImpl.java:  Likewise.
	* java/nio/ShortViewBufferImpl.java:  Likewise.

From-SVN: r77917
2004-02-16 11:54:49 -08:00
Per Bothner cf68bacaad CharBufferImpl.java: Inline super constructor.
* java/nio/CharBufferImpl.java:  Inline super constructor.
	* java/nio/DoubleBufferImpl.java:  Likewise.
	* java/nio/FloatBufferImpl.java:  Likewise.
	* java/nio/IntBufferImpl.java:  Likewise.
	* java/nio/LongBufferImpl.java:  Likewise.
	* java/nio/ShortBufferImpl.java:  Likewise.
	* java/nio/CharBuffer.java:  Remove unused constructor.
	* java/nio/DoubleBuffer.java:  Likewise.
	* java/nio/FloatBuffer.java:  Likewise.
	* java/nio/IntBuffer.java:  Likewise.
	* java/nio/LongBuffer.java:  Likewise.
	* java/nio/ShortBuffer.java:  Likewise.

From-SVN: r77916
2004-02-16 11:53:27 -08:00
Ito Kazumitsu af1967542f ObjectInputStream.java (readClassDescriptor): Avoid the overflow of fieldmapping.
2004-02-15  Ito Kazumitsu  <kaz@maczuka.gcd.org>

	* java/io/ObjectInputStream.java (readClassDescriptor): Avoid the
        overflow of fieldmapping.

From-SVN: r77843
2004-02-15 11:53:45 +00:00
Per Bothner 19b17484d0 AbstractInterruptibleChannel.java (close): Set closed before calling implCloseChannel, as in the spec.
* java/nio/channels/spi/AbstractInterruptibleChannel.java (close):
	Set closed before calling implCloseChannel, as in the spec.

From-SVN: r77809
2004-02-14 10:41:48 -08:00
Michael Koch 31d25d83b6 2004-02-11 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java
	(setReuseAddress): Use Boolean.valueOf() instead of creating a new
	Boolean object.
	(setBroadcast): Likewise.
	* java/net/MulticastSocket.java
	(setLoopbackMode): Likewise.
	* java/net/ServerSocket.java
	(setReuseAddress): Likewise.
	* java/net/Socket.java
	(setTcpNoDelay): Likewise.
	(setSoLinger): Likewise.
	(setOOBInline): Likewise.
	(setKeepAlive): Likewise.
	(setReuseAddress): Likewise.
	* java/net/URLConnection.java
	(setContentHandler): Replace == with equals().
	* java/net/URLStreamHandler.java
	(hostSEquals): Fix checking host addresses.
	(toExternalForm): Dont check protocol for null. We know already its
	not null.

From-SVN: r77670
2004-02-11 18:22:09 +00:00
David Jee 7b38bcac64 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
2004-02-10 18:57:22 +00:00
David Jee dcee9e6022 2004-02-10 David Jee <djee@redhat.com>
* java/awt/GridBagLayout.java
	(GridBagLayout): New private field, internalcomptable.
	(lookupInternalConstraints): New method.
	(ArrangeGrid): Use components' MINSIZE. Use internalcomptable.
	(GetLayoutInfo): Reimplement.
	(calcCellSizes): Ignore rows/columns with size 0.

From-SVN: r77612
2004-02-10 18:54:25 +00:00
Per Bothner 40c23042f4 ByteBuffer.java (shiftDown): New helper method.
* java/nio/ByteBuffer.java (shiftDown):  New helper method.
	* java/nio/natDirectByteBufferImpl.cc (shiftDown):  New implementation.
	* java/nio/ByteBufferImpl.java (compact):  Use new shiftDown method.
	* sava/nio/ByteBufferHelper.java:  Remove redundant 'final' specifiers.
	Pass ByteOrder parameter to most methods, since the underlying
	ByteBuffer's order isn't always what we should use.
	* java/nio/ByteBufferImpl.java:  Pass byte-order various places.
	* java/nio/DirectByteBufferImpl.java:  Likewise.
	Use ByteBufferHelper methods.
	* java/nio/MappedByteBufferImpl.java:  Likewise.
	(compact):  Use shiftDown.
	* java/nio/CharViewBufferImpl.java (<init>):  Pass byte-order.
	(get, put):  Use ByteBufferHelper.
	(compact):  Use new shiftDown method.
	(duplicate(boolean)):  New helper method.
	(duplicate, asReadOnlyBuffer):  Use it.
	(order):  Return endian field.
	* java/nio/DoubleViewBufferImpl.java:  Likewise.
	* java/nio/FloatViewBufferImpl.java:  Likewise.
	* java/nio/IntViewBufferImpl.java:  Likewise.
	* java/nio/LongViewBufferImpl.java:  Likewise.
	* java/nio/ShortViewBufferImpl.java:  Likewise.
	* java/nio/CharViewBufferImpl.java (subsequence):  Redundant test.
	* java/nio/DirectByteBufferImpl.java (shiftDown):  New native method.
	(compact):  Re-implement using shiftDown.

From-SVN: r77501
2004-02-08 13:02:53 -08:00
Michael Koch 3298fd35f7 2004-02-06 Michael Koch <konqueror@gmx.de>
* java/io/ObjectInputStream.java
	(currentClassLoader): Reverted to old version of this method.

From-SVN: r77397
2004-02-06 14:05:37 +00:00
Jeroen Frijters 2941cc061a ObjectInputStream.java: Made all calls to dumpElement[ln] conditional on dump flag.
2004-02-06  Jeroen Frijters  <jeroen@frijters.net>

	* java/io/ObjectInputStream.java: Made all calls
	to dumpElement[ln] conditional on dump flag. (readObject): Changed to
	use cached info from ObjectStreamClass. (readClassDescriptor):
	Cache more information in ObjectStreamClass. (processResolution,
	readFields): Use cached info from ObjectStreamClass.
	(newObject): Throw exception instead of returning null for failure.
	(getField, getMethod, callReadMethod, setBooleanField, setByteField,
	setCharField, setDoubleField, setFloatField, setIntField,
	setLongField, setShortField, setObjectField, readObjectParams):
	Removed. (dumpElement, dumpElementln): Removed dump flag condition
	check.
	* java/io/ObjectStreamField.java (hasReadMethod): Removed.
	(setClass): Added call to cacheMethods() (findMethod): New method.
	(cacheMethods): New method. (ObjectStreamClass): Added call to
	cacheMethods(). (setFields): Cache fields. (getClassUID): Use
	AccessController.doPrivileged to invoke setAccessible.
	(readObjectMethod, readResolveMethod, realClassIsSerializable,
	realClassIsExternalizable, fieldMapping, firstNonSerializableParent):
	New fields.
	* java/io/ObjectStreamField.java (ObjectStreamField): New constructor.
	(ObjectStreamField): Removed FIXME workaround. (getTypeString,
	isPrimitive): Made safe for cases where type == null.
	(setBooleanField, setByteField, setCharField, setShortField,
	setIntField, setLongField, setFloatField, setDoubleField,
	setObjectField): New methods.

From-SVN: r77395
2004-02-06 13:27:36 +00:00
Thomas Fitzsimmons 58206f1160 Component.java (getFont): Return a default font instead of null.
2004-02-05  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* java/awt/Component.java (getFont): Return a default font
	instead of null.

From-SVN: r77352
2004-02-05 23:21:40 +00:00
Thomas Fitzsimmons bc1ec7f70e Scrollbar.java (next_scrollbar_number): New field.
2004-02-05  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* java/awt/Scrollbar.java (next_scrollbar_number): New field.
	(Scrollbar (int, int, int, int, int)): Make default page
	increment 10.
	(setValues): Only call peer.setValues if one of the values has
	changed.
	(generateName): New method.
	(getUniqueLong): New method.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c
	(range_scrollbar): Remove structure.
	(post_adjustment_event): Remove function.
	(post_change_event): Accept jobject argument.
	(create): Cast jints to gdoubles.  Round scrollbar values to the
	nearest integer.  Clamp min, max and value settings.
	(connectJObject): Connect hook to widget->window.
	(connectSignals): Remove range_scrollbar structure variables.
	Remove "move-slider" connection.  Pass global peer reference to
	"value-changed" callback.
	(setLineIncrement): Cast jint value to gdouble.
	(setPageIncrement): Likewise.
	(setValues): Likewise.  Clamp min, max and value settings.

From-SVN: r77332
2004-02-05 19:45:02 +00:00
Michael Koch 2d16865792 2004-02-05 Michael Koch <konqueror@gmx.de>
* java/awt/datatransfer/DataFlavor.java
	(imageFlavor): Javadoc added.
	(javaJVMLocalObjectType): Fixed.

From-SVN: r77328
2004-02-05 18:27:44 +00:00
Michael Koch 7959d59810 2004-02-05 Michael Koch <konqueror@gmx.de>
* java/lang/Thread.java
	(Thread): Reordered.
	(setContextClassLoader): Fixed javadoc comment.
	(setPriority): Reordered.
	(yield): Reordered.
	(initialize_native): Reordered.
	(gen_name): Reordered.

From-SVN: r77327
2004-02-05 18:20:46 +00:00
Michael Koch 5ad136540e Thread.java: Reordered fields...
2004-02-05  Michael Koch  <konqueror@gmx.de>

	* java/lang/Thread.java: Reordered fields, reformated much code,
	no functional changes, some variables renamed, javadoc comments
	merged.

From-SVN: r77322
2004-02-05 16:34:30 +00:00
Michael Koch 6d0c7d7b6a Deflater.java, [...]: Reformated and javadoc comments merged from classpath.
2004-02-05  Michael Koch  <konqueror@gmx.de>

	* java/util/zip/Deflater.java,
	java/util/zip/DeflaterOutputStream.java,
	java/util/zip/GZIPInputStream.java:
	Reformated and javadoc comments merged from classpath.

From-SVN: r77319
2004-02-05 16:04:28 +00:00
Graydon Hoare cbc848da46 SwingUtilities.java: Many new functions.
2004-02-02  Graydon Hoare  <graydon@redhat.com>

	* javax/swing/SwingUtilities.java: Many new functions.
	* java/awt/Container.java (LightweightDispatcher): Reimplement.
	* javax/swing/basic/BasicGraphicsUtils.java
	(getPreferredButtonSize): Start layout from top-left corner.

From-SVN: r77271
2004-02-04 20:43:32 +00:00
Olga Rodimina e530f3709e AffineTransform.java: Corrected comments on the field definitions for m11 and m10.
* java/awt/geom/AffineTransform.java:
	Corrected comments on the field definitions for
	m11 and m10.
	(shear): Fixed few errors that caused shear
	transformation to be performed incorrectly.
	(createInverse): Fixed to return correct
	inverse of the given matrix.

From-SVN: r77261
2004-02-04 18:43:54 +00:00
Tom Tromey 2565abce54 natPosixProcess.cc (startProcess): Handle case where PATH or LD_LIBRARY_PATH is not set in parent environment.
* java/lang/natPosixProcess.cc (startProcess): Handle case where
	PATH or LD_LIBRARY_PATH is not set in parent environment.

From-SVN: r77203
2004-02-04 00:07:19 +00:00
Thomas Fitzsimmons b6d3cb37ef GtkListPeer.java, [...]: Fix handling of alias methods...
2004-02-03  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* gnu/java/awt/peer/gtk/GtkListPeer.java,
	java/awt/BorderLayout.java, java/awt/CardLayout.java,
	java/awt/CheckboxGroup.java, java/awt/Choice.java,
	java/awt/Component.java, java/awt/Container.java,
	java/awt/FontMetrics.java, java/awt/GridBagLayout.java,
	java/awt/LayoutManager2.java, java/awt/List.java,
	java/awt/Menu.java, java/awt/MenuBar.java,
	java/awt/MenuItem.java, java/awt/Polygon.java,
	java/awt/Rectangle.java, java/awt/ScrollPane.java,
	java/awt/Scrollbar.java, java/awt/TextArea.java,
	java/awt/TextField.java,
	java/awt/image/renderable/RenderContext.java,
	javax/swing/JApplet.java: Fix handling of alias methods, where a
	method has been deprecated in favour of a new one with the same
	funtion but a different name.  Put the method implementation in
	the deprecated method and have the new method call the
	deprecated one.  Make all other code call the new method.

From-SVN: r77178
2004-02-03 17:10:56 +00:00
Mohan Embar 8696d927c0 * gnu/java/nio/DatagramChannelImpl.java
(inChannelOperation): New field.
	(isInChannelOperation): New accessor.
	(setInChannelOperation): New modifier.
	(receive): Use capacity() - position() of destination
	buffer instead of remaining(). Set and reset our "in
	channel operation indicator" before and after delegating
	the receive to our datagram socket. Removed testing code.
	Update destination buffer's current position if it is
	backed by a byte array (hasArray() is true).
	(send): Set and reset our "in channel operation indicator"
	before and after delegating the send to our datagram socket.
	Removed testing code. Update source buffer's current position
	if it is backed by a byte array (hasArray() is true).
	* gnu/java/nio/SocketChannelImpl.java (read(ByteBuffer)):
	Use capacity() - position() of destination buffer instead
	of remaining().
	* java/net/DatagramSocket.java (receive): Don't throw an
	IllegalBlockingModeException if we have a non-blocking
	channel which initiated this operation.
	(send): Likewise.

From-SVN: r77173
2004-02-03 16:07:24 +00:00
Mohan Embar 7dcc98e25c * gnu/java/net/PlainSocketImpl.java
(inChannelOperation): New field.
	(isInChannelOperation): New accessor.
	(setInChannelOperation): New modifier.
	* gnu/java/nio/ServerSocketChannelImpl.java
	(accept): Set and reset our server socket's PlainSocketImpl's
	"in channel operation" indicator before and after delegating
	the accept to our server socket.
	* gnu/java/nio/SocketChannelImpl.java
	(connect): Set and reset our socket's PlainSocketImpl's "in channel
	operation" indicator before and after delegating the operation to
	our socket.
	(read): Likewise.
	(write): Likewise.
	* java/net/ServerSocket.java (implAccept): Don't throw an
	IllegalBlockingModeException if we have a non-blocking
	channel which initiated this accept operation.
	* java/net/Socket.java (connect): Don't throw an
	IllegalBlockingModeException if we have a non-blocking
	channel which initiated this connect operation.
	* java/nio/channels/spi/AbstractSelectableChannel.java
	(configureBlocking): Only call implConfigureBlocking() if
	the desired blocking mode is different from our current one.

From-SVN: r76956
2004-01-30 13:43:21 +00:00
Mohan Embar ae30b3b25d BufferedReader.java (sbuf): New field.
* java/io/BufferedReader.java (sbuf): New field.
	(readLine): Use String.valueOf instead of new String() as per
	Per Bothner's suggestion. Use instance sbuf field instead of a
	local StringBuffer instance.
	* java/io/InputStreamReader.java (read(char[],int,int)): Pass the
	caller's buffer to refill().
	(read(void)): Pass our internal work buffer to refill if our
	input queue is empty.
	(refill): Changed return type to int. Use the specified buffer
	instead of our work buffer as per Bryce McKinlay's suggestion.
	Return the number of characters read or -1 for EOF.

From-SVN: r76927
2004-01-30 06:33:43 +00:00
Michael Koch f79b77082f 2004-01-27 Michael Koch <konqueror@gmx.de>
* java/lang/Class.java
	(getConstructor): Removed SecurityException from throws clause.
	(_getConstructors): Likewise.
	(getConstructors): Likewise.
	(getDeclaredConstructor): Likewise.
	(getDeclaredClasses): Likewise.
	(getDeclaredConstructors): Likewise.
	(getDeclaredField): Likewise.
	(getDeclaredMethod): Likewise.
	(getDeclaredMethods): Likewise.
	(getField): Likewise.
	(getMethod): Likewise.
	(getMethods): Likewise.

From-SVN: r76747
2004-01-27 21:00:19 +00:00
Kim Ho e300e74f17 2004-01-27 Kim Ho <kho@redhat.com>
* gnu/java/awt/peer/gtk/GtkFramePeer.java
        (removeMenuBarPeer): Remove MenuBarPeer argument.
        * gnu/java/awt/peer/gtk/GtkMenuComponentPeer.java
        (dispose): Call native method.
        * java/awt/Frame.java (setMenuBar): Create and remove
        MenuBar peers only if the Frame has a peer.
        (addNotify): Create the MenuBar peer if one exists.
        (removeNotify): Remove MenuBar peer if one exists.
        * java/awt/Menu.java: Fix imports.
        (addNotify): Don't use full class name.
        (removeNotify): Call removeNotify on all children.
        * java/awt/MenuBar.java (removeNotify): Call
        removeNotify on all children.
        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
        (removeMenuBarPeer): Remove MenuBarPeer argument.
        Iterate through children to find the Frame's MenuBar.
        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuComponentPeer.c
        New file.
        (dispose): Remove references to the MenuComponent.

From-SVN: r76740
2004-01-27 19:29:57 +00:00
David Jee 7edbd87e17 2004-01-26 David Jee <djee@redhat.com>
* gnu/java/awt/peer/gtk/GtkComponentPeer.java
	(handleEvent): Implemented. Handles PaintEvents.
	(paint): Implemented. Use GTK native methods to queue updates
        for this heavyweight peer.
	* gnu/java/awt/peer/gtk/GtkContainerPeer.java
	(handleEvent): Removed.
	* java/awt/Component.java
	(paint): Implemented. Explictly paint the heavyweight peer.
	(update): Clear the background for heavyweight components.
	(paintAll): No need to call peer.paint() anymore.
	(processEvent): Don't process PaintEvents here. It's now done in
	the peer's handleEvent().
	(processPaintEvent): Removed.
	* java/awt/Container.java
	(paint): No need to call super.paint(). Visit heavyweight
	children as well.
	(update): Don't clear the background here.  It's done in
	Component.update().
	(visitChildren): Added check to not recurse into Containers.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
	(filter_expose_event_handler): New method.  Filter unwanted
	expose events while painting heavyweight peers.
	(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_addExposeFilter):
	New method. Connect filter and block pre_event_handler.
	(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_removeExposeFilter):
	New method. Disconnect filter and unblock pre_event_handler.
	(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetQueueDrawArea):
	New method. Invalidate and update given area.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c
	(pre_event_handler): Add checks for unwanted expose events.

From-SVN: r76668
2004-01-26 21:55:42 +00:00
Thomas Fitzsimmons 062732fd2b TextArea.java: Fix indentation.
2004-01-25  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* java/awt/TextArea.java: Fix indentation.  Flesh out javadocs.
	(getMinimumSize (int, int)): Fix FIXME -- return Dimension (0,0)
	when peer is null.
	(setColumns): Remove FIXME -- peer will retrieve number of
	columns by calling getColumns.
	(setRows): Likewise for number of rows.
	(next_text_number): New field.
	(paramString): Fix param string.
	(generateName): New method.
	(getUniqueLong): New method.

From-SVN: r76577
2004-01-25 18:36:04 +00:00
Michael Koch 135f54eb84 Class.java: Imports reworked, reformated.
2004-01-25  Michael Koch  <konqueror@gmx.de>

	* java/lang/Class.java: Imports reworked, reformated.
	(Class): Javadoc added.
	(forName): Likewise.
	(getClasses): Likewise.
	(getClassLoader): Likewise.
	(getComponentType): Likewise.
	(getConstructor): Likewise.
	(getConstructors): Likewise.
	(getDeclaredConstructor): Likewise.
	(getDeclaredClasses): Likewise.
	(getDeclaredConstructors): Likewise.
	(getDeclaredField): Likewise.
	(getDeclaredMethod): Likewise.
	(getDeclaredMethods): Likewise.
	(getDeclaringClass): Likewise.
	(getField): Likewise.
	(getInterfaces): Likewise.
	(getMethod): Likewise.
	(getMethods): Likewise.
	(getModifiers): Likewise.
	(getName): Likewise.
	(getResource): Likewise.
	(getResourceAsStream): Likewise.
	(getSigners): Likewise.
	(setSigners): Likewise.
	(getSuperclass): Likewise.
	(isArray): Likewise.
	(isAssignableFrom): Likewise.
	(isInstance): Likewise.
	(isInterface): Likewise.
	(isPrimitive): Likewise.
	(newInstance): Likewise.
	(getProtectionDomain): Likewise.
	(toString): Likewise.
	(Class): Moved.
	(initializeClass): Likewise.
	(finalize): Likewise.

From-SVN: r76554
2004-01-25 13:08:08 +00:00
Michael Koch 030c1e2392 InflaterInputStream.java: Merged class documentation with classpath.
2004-01-24  Michael Koch  <konqueror@gmx.de>

	* java/util/zip/InflaterInputStream.java: Merged class documentation
	with classpath.

From-SVN: r76519
2004-01-24 20:32:57 +00:00
Michael Koch 0791cb20bc VMClassLoader.java: Reworked imports.
2004-01-23  Michael Koch  <konqueror@gmx.de>

	* java/lang/VMClassLoader.java: Reworked imports.

From-SVN: r76426
2004-01-23 15:29:38 +00:00
Michael Koch f0bf056e74 2004-01-23 Michael Koch <konqueror@gmx.de>
* java/text/CollationElementIterator.java:
	(setText): New method.

From-SVN: r76423
2004-01-23 15:15:31 +00:00
Michael Koch 9719e37cec FileLockImpl.java: Fixed filename in copyright.
2004-01-23  Michael Koch  <konqueror@gmx.de>

	* gnu/java/nio/FileLockImpl.java:
	Fixed filename in copyright.
	(released): Removed.
	(finalize): New method.
	* gnu/java/nio/natFileLockImpl.cc
	(releaseImpl): Implemented.
	* java/nio/channels/FileChannelImpl.java:
	Reworked imports.
	(lock): Implemented.
	(lockImpl): New method.
	(tryLock): Implemented.
	(tryLockImpl): New method.
	* java/nio/channels/natFileChannelImpl.cc
	(lockImpl): New method.
	(tryLockImpl): New method.

From-SVN: r76422
2004-01-23 14:37:09 +00:00
Michael Koch ca1d829f31 2004-01-23 Michael Koch <konqueror@gmx.de>
* java/io/FileDescriptor.java
	(lock): New method.
	(tryLock): New method.
	(unlock): New method.
	* java/io/natFileDescriptorEcos.cc
	(lock): New method.
	(tryLock): New method.
	(unlock): New method.
	* java/io/natFileDescriptorPosix.cc
	(lock): New method.
	(tryLock): New method.
	(unlock): New method.
	* java/io/natFileDescriptorWin32.cc
	(lock): New method.
	(tryLock): New method.
	(unlock): New method.

From-SVN: r76421
2004-01-23 14:07:28 +00:00
Michael Koch 55777f44dc 2004-01-23 Michael Koch <konqueror@gmx.de>
* java/io/FileDescriptor.java
	(sync): Moved around, added javadoc.
	(valid): Likewise.
	(open): Likewise.
	(write): Likewise.
	(close): Likewise.
	(setLength): Likewise.
	(seek): Likewise.
	(getLength): Likewise.
	(getFilePointer): Likewise.
	(read): Likewise.
	(available): Likewise.
	(finalize): Likewise.

From-SVN: r76419
2004-01-23 13:50:10 +00:00
Michael Koch 8fac50e006 2004-01-23 Michael Koch <konqueror@gmx.de>
* java/io/FileDescriptor.java
	(in, out, err): Added javadoc.
	(static): Merged loading code.
	(fd, position): Moved around.

From-SVN: r76411
2004-01-23 12:29:05 +00:00
Michael Koch 834d51fe49 Class.java, [...]: Merged copyright with classpath.
2004-01-23  Michael Koch  <konqueror@gmx.de>

	* java/lang/Class.java,
	java/lang/Object.java,
	java/lang/Thread.java: Merged copyright with classpath.

From-SVN: r76409
2004-01-23 11:56:48 +00:00
Michael Koch a36d3fe4aa FileDescriptor.java: Merged copyright with classpath to start merging this class.
2004-01-23  Michael Koch  <konqueror@gmx.de>

	* java/io/FileDescriptor.java: Merged copyright with classpath to
	start merging this class.

From-SVN: r76408
2004-01-23 11:45:54 +00:00
Graydon Hoare ca3bb0c283 2004-01-22 Graydon Hoare <graydon@redhat.com>
* gnu/java/awt/peer/gtk/GdkClasspathFontPeer.java:
	* gnu/java/awt/peer/gtk/GdkGlyphVector.java:
	Predicate static initialization on GtkToolkit.useGraphics2D().
	* java/awt/Component.java (processPaintEvent): Consume event.
	* javax/swing/AbstractButton.java: Reimplement, document.
	* javax/swing/DefaultButtonModel.java: Reimplement, document.
	* javax/swing/JComponent.java (paint): Use double buffer.
	(listenerList): Enable member.
	* javax/swing/ToggleButtonModel.java: Remove incorrect constructor.
	* javax/swing/JToggleButton.java
	(JToggleButton): Modify model constructor.
	* javax/swing/SwingUtilities.java
	(layoutCompoundLabel): Adjust arithmetic.
	* javax/swing/plaf/basic/BasicButtonUI.java: Reimplement, document.
	* javax/swing/plaf/basic/BasicGraphicsUtils.java
	(getPreferredButtonSize): Include margins in calculation.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
	(Java_gnu_java_awt_peer_gtk_GtkWindowPeer_connectSignals):
	Receive up events from subordinate layout component.

From-SVN: r76344
2004-01-22 09:54:19 +00:00
Thomas Fitzsimmons 75ef0594a3 Component.java (show): Set visible to true before showing the peer.
2004-01-21  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* java/awt/Component.java (show): Set visible to true before
	showing the peer.

From-SVN: r76325
2004-01-22 00:22:27 +00:00
David Jee 3f07b28898 2004-01-21 David Jee <djee@redhat.com>
* java/awt/Container.java
        (LightweightDispatcher.handleEvent): Add an extra check to avoid
        dispatching MOUSE_ENTERED event twice. Translate the point for
        the mouse event target before dispatching the event.

From-SVN: r76278
2004-01-21 14:39:15 +00:00
Fernando Nasser 6fdab8ccdb EventQueue.java (invokeAndWait): Use list-aware isDispatchThread method to replace wrong test condition.
* java/awt/EventQueue.java (invokeAndWait): Use list-aware
        isDispatchThread method to replace wrong test condition.

From-SVN: r76165
2004-01-19 18:22:29 +00:00
Fernando Nasser 605d10f7f2 EventQueue.java (pop): Prevent racing condition to add events to the queue out of order by acquiring...
* java/awt/EventQueue.java (pop): Prevent racing condition to add
        events to the queue out of order by acquiring locks in the proper
        order and not by releasing one before acquiring the other.

From-SVN: r76161
2004-01-19 17:38:36 +00:00
Fernando Nasser aadc6da0c4 EventQueue.java (getCurrentEvent): Consider that system events may be handled by any queue in the stack.
* java/awt/EventQueue.java (getCurrentEvent): Consider that system
        events may be handled by any queue in the stack.

From-SVN: r76150
2004-01-19 14:51:54 +00:00
Kim Ho 2c20a17152 GtkFramePeer.java (getMenuBarHeight): Added MenuBarPeer parameter.
2004-01-19  Kim Ho  <kho@redhat.com>

        * gnu/java/awt/peer/gtk/GtkFramePeer.java (getMenuBarHeight): Added
        MenuBarPeer parameter.
        (removeMenuBarPeer): New native method.
        (setMenuBar): Call remove if menu bar is null. Adjust insets
        appropriately.
        (postSizeAllocateEvent): New method. Called when menu bar size is
        allocated. Adjust insets and redo layout.
        (GtkFramePeer): Set menu bar during frame creation.
        (postConfigureEvent): Adjust position and size to accomodate
        menu bar.
        * java/awt/Frame.java (setMenuBar): addNotify to create menu bar.
        * java/awt/Menu.java (addSeparator): Use peer's addSeparator.
        (addNotify): Create the peer if it doesn't exist and call addNotify
        for the menu's items.
        * java/awt/MenuBar.java (addNotify): Create this menu bar's menus.
        * java/awt/MenuItem.java (addNotify): Create the peer if it
        doesn't exist.
        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
        (removeMenuBarPeer): New method. Remove menu bar on the current
        frame.
        (setMenuBarPeer): Add the menu bar to the current frame and the
        callback for size-allocate events on the menu bar.
        (getMenuBarHeight): Add menu bar parameter.
        (menubar_resize_cb): New callback method for postSizeAllocate events.

        Also: Fix indentation on last ChangeLog entry.

From-SVN: r76149
2004-01-19 14:27:45 +00:00
Tom Tromey d440f6424f * java/awt/Container.java: Typo and indentation fixes.
From-SVN: r76004
2004-01-17 00:01:59 +00:00
Tom Tromey b54a271561 natClassLoader.cc: Moved VMClassLoader methods...
* java/lang/natClassLoader.cc: Moved VMClassLoader methods...
	* java/lang/natVMClassLoader.cc: ...here.  New file.
	* Makefile.in: Rebuilt.
	* Makefile.am (nat_source_files): Added natVMClassLoader.cc.

From-SVN: r76003
2004-01-16 23:54:22 +00:00
Fernando Nasser da1c22e144 EventQueue.java (pop): Prevent breaking the chain if pop is called for an intermediate queue.
* java/awt/EventQueue.java (pop): Prevent breaking the chain if pop
        is called for an intermediate queue.

From-SVN: r75998
2004-01-16 22:26:49 +00:00
Fernando Nasser 101900aa28 EventDispatchThread.java (run): Stop running when interrupted.
* java/awt/EventDispatchThread.java (run): Stop running when
        interrupted.
        * java/awt/EventQueue.java (pop): Stop dispatch thread when done.
        Reset the queue after transferring its contents.
        (push): Start a new dispatch thread if none is running.

From-SVN: r75977
2004-01-16 16:15:49 +00:00