Commit Graph

545 Commits

Author SHA1 Message Date
Michael Koch 96d22b1232 ServiceFactory.java, [...]: New files.
2004-04-21  Michael Koch  <konqueror@gmx.de>

	* gnu/classpath/ServiceFactory.java,
	gnu/classpath/ServiceProviderLoadingAction.java,
	javax/imageio/ImageReader.java,
	javax/imageio/ImageTranscoder.java,
	javax/imageio/ImageWriter.java,
	javax/imageio/package.html,
	javax/imageio/spi/IIOServiceProvider.java,
	javax/imageio/spi/ImageInputStreamSpi.java,
	javax/imageio/spi/ImageOutputStreamSpi.java,
	javax/imageio/spi/ImageReaderWriterSpi.java,
	javax/imageio/spi/ImageTranscoderSpi.java,
	javax/imageio/spi/RegisterableService.java,
	javax/imageio/spi/ServiceRegistry.java,
	javax/imageio/spi/package.html,
	javax/imageio/stream/IIOByteBuffer.java,
	javax/imageio/stream/ImageInputStream.java,
	javax/imageio/stream/ImageOutputStream.java,
	javax/imageio/stream/package.html:
	New files.
	* Makefile.am
	(ordinary_java_source_files): Added
	gnu/classpath/ServiceFactory.java and
	gnu/classpath/ServiceProviderLoadingAction.java.
	(javax_source_files): Added
	javax/imageio/ImageReader.java,
	javax/imageio/ImageTranscoder.java,
	javax/imageio/ImageWriter.java,
	javax/imageio/spi/IIOServiceProvider.java,
	javax/imageio/spi/ImageInputStreamSpi.java,
	javax/imageio/spi/ImageOutputStreamSpi.java,
	javax/imageio/spi/ImageReaderWriterSpi.java,
	javax/imageio/spi/ImageTranscoderSpi.java,
	javax/imageio/spi/RegisterableService.java,
	javax/imageio/spi/ServiceRegistry.java,
	javax/imageio/stream/IIOByteBuffer.java,
	javax/imageio/stream/ImageInputStream.java and
	javax/imageio/stream/ImageOutputStream.java.
	* Makefile.in: Regenerated.

From-SVN: r80951
2004-04-21 08:20:31 +00:00
Michael Koch 0150fc2287 2004-04-20 Michael Koch <konqueror@gmx.de>
* gnu/java/nio/FileLockImpl.java
	(static): Removed, not needed anymore.
	* gnu/java/nio/channels/FileChannelImpl.java
	(FileChannelImpl): Made final.
	(mode): Made private.
	(READ, WRITE, APPEND): Made public.
	(EXCL, SYNC, DSYNC): Likewise.
	(static): Load native JNI library, when needed.
	(length): Unused, removed.
	(available): Made public.
	(implPosition): Throws IOException.
	(seek): Likewise.
	(implTruncate): Likewise.
	(unlock): Likewise.
	(lock): Likewise.

From-SVN: r80891
2004-04-20 10:43:48 +00:00
Mark Wielaard 7f6f517f8a GtkFontPeer.java: Use fallback when MissingResourceException is thrown.
2004-04-20  Mark Wielaard  <mark@klomp.org>

	* gnu/java/awt/peer/gtk/GtkFontPeer.java: Use fallback when
	MissingResourceException is thrown.
	* gnu/java/awt/peer/gtk/GtkToolkit.java (getFontPeer): Don't return
	null when a MissingResourceException is thrown. Should never happen.

From-SVN: r80888
2004-04-20 09:46:28 +00:00
Michael Koch 8ecb03465a [multiple changes]
2004-04-20  Sascha Brawer  <brawer@dandelis.ch>

	* java/awt/image/DataBufferShort.java,
	java/awt/image/DataBufferFloat.java,
	java/awt/image/DataBufferDouble.java,
	java/awt/image/PixelInterleavedSampleModel.java: New files.
	* gnu/java/awt/Buffers.java (createBuffer, createBufferFromData,
	getData): Added support	for TYPE_SHORT, TYPE_FLOAT and TYPE_DOUBLE.

2004-04-20  Michael Koch  <konqueror@gmx.de>

	* Makefile.am (java_source_files): Added
	java/awt/image/DataBufferDouble.java,
	java/awt/image/DataBufferFloat.java,
	java/awt/image/DataBufferShort.java and
	java/awt/image/PixelInterleavedSampleModel.java.
	* Makefile.in: Regenerated.

From-SVN: r80886
2004-04-20 08:37:47 +00:00
Graydon Hoare 31e632d3e4 [multiple changes]
2004-04-09  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* gnu/java/awt/peer/gtk/GtkPanelPeer.java (connectSignals):
	Remove method.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPanelPeer.c: Remove
	unused code.

2004-04-02  Olga Rodimina  <rodimina@redhat.com>

	* Makefile.am: Added new file.
	* Makefile.in: Regenerate.
	* javax/swing/ImageIcon.java:
	(ImageIcon(file)): set description of the icon
	to the file name
	* javax/swing/JCheckBoxMenuItem.java:
	Mostly Implemented. Work in progress.
	* javax/swing/JRadioButtonMenuItem.java:
 	Reimplement constructors to use JToggleButtonModel.
	* javax/swing/plaf/basic/BasicIconFactory.java:
	(getCheckBoxMenuItemIcon): return check box
	icon.
	* javax/swing/plaf/basic/BasicMenuItemUI.java:
	paint menu item selected only when it is armed and
	pressed.

2004-04-02  David Jee  <djee@redhat.com>

	* gnu/java/awt/peer/gtk/GtkMenuItemPeer.java
	(GtkMenuItemPeer): Only connect signals if this isn't a Menu peer.
	* java/awt/Component.java
	(add): Set the parent of the popup as this component.
	* java/awt/PopupMenu.java
	(addNotify): Create popup menu when peer is null.
	(show): Call addNotify() if peer is null.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c
	(Java_gnu_java_awt_peer_gtk_GtkPopupMenuPeer_show): Set the button
	argument for gtk_menu_popup() as zero. This causes the popup menu to
	respond to any mouse button.

2004-03-31  Olga Rodimina  <rodimina@redhat.com>

	* Makefile.am: Added new file.
	* Makefile.in: Regenerate.
	* javax/swing/JRadioButtonMenuItem.java:
	Implemented.
	* javax/swing/plaf/basic/BasicIconFactory.java:
	(getRadioButtonMenuItemIcon): Return
	radio button icon.
	* javax/swing/plaf/basic/BasicMenuItemUI.java:
	(getPreferredSize): Add size of checkIcon if it
	exists.
	(installDefaults): Don't initialize checkIcon.
	It's value will be set in subclasses.
	(uninstallDefaults): remove uninstallation of
	checkIcon.
	(paint): Moved code to paintMenuItem().
	(paintMenuItem): Implemented.
	* javax/swing/plaf/basic/BasicRadioButtonMenuItemUI.java:
	UI delegate for JRadioButtonMenuItem.

2004-03-29  Olga Rodimina  <rodimina@redhat.com>

	* javax/swing/plaf/basic/BasicMenuItemUI.java:
	Corrected position of the accelerator.

2004-03-29  Olga Rodimina  <rodimina@redhat.com>

	* Makefile.am: Added new file.
	* Makefile.in: Regenerate.
	* javax/swing/JMenuItem.java: Partly
	implemented. Work in progress
	* javax/swing/plaf/basic/BasicLookAndFeel.java:
	Changed default value of acceleratorDelimiter.
	* javax/swing/plaf/basic/BasicMenuItemUI.java:
	New class. Partly implemented.

2004-03-26  Mark Wielaard  <mark@klomp.org>

	* native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c
	(item_activate): Declare label before use.
	* native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
	(gtkSetFont): Removed unused variable label.
	(addExposeFilter): Declare variables before use.
	(removeExposeFilter): Likewise.
	* native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c
	(ok_clicked): Declare str_fileName before use.

2004-03-26  David Jee  <djee@redhat.com>

	* gnu/java/awt/peer/gtk/GtkMenuPeer.java
	(addSeparator): Remove.
	* java/awt/Menu.java
	(separator): Remove static final MenuItem field.
	(separatorLabel): New static final String field.
	(addSeparator): Do not use peer method; use add(MenuItem) instead.
	Use separatorLabel to denote that it is a separator.
	(insertSeparator): Create a new MenuItem with separatorLabel, instead
	of reusing the static separator instance, because a MenuItem instance
	can't be added more than once without being cloned.
	* java/awt/peer/MenuPeer.java
	(addSeparator): Remove from interface.

2004-03-26  David Jee  <djee@redhat.com>

	* gnu/java/awt/peer/gtk/GtkMenuItemPeer.java
	(connectSignals): New native method declaration.
	(GtkMenuItemPeer): Connect signals if the parent is a Menu.
	* java/awt/MenuItem.java
	(getActionCommand): Return the label if the action command is not set.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuBarPeer.c
	(Java_gnu_java_awt_peer_gtk_GtkMenuBarPeer_addMenu): Use
	gtk_menu_shell_append().
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuItemPeer.c
	(item_activate): Fix argument type.
	(Java_gnu_java_awt_peer_gtk_GtkMenuItemPeer_create): Do not connect
	signal here.
	(Java_gnu_java_awt_peer_gtk_GtkMenuItemPeer_connectSignals): New
	method.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c
	(Java_gnu_java_awt_peer_gtk_GtkMenuPeer_create): Check if a label is
	given. Add the menu widget's top-level GtkWindow to the global window
	group, so it can grab the pointer.
	(Java_gnu_java_awt_peer_gtk_GtkMenuPeer_addItem): Use
	gtk_menu_shell_append().

2004-03-23  Graydon Hoare  <graydon@redhat.com>

	* java/text/AttributedString.java
	(addAttribute): Fix off-by-one.
	(getIterator): Likewise.
	* java/text/AttributedStringIterator.java
	(getRunLimit): Correct logic.
	(getRunStart): Likewise.
	(getAttribute): Fix inequality.
	(getAttributes): Likewise.
	* testsuite/libjava.mauve/xfails: Remove AttributedString xfail.

2004-03-23  Kim Ho  <kho@redhat.com>

	* javax/swing/plaf/basic/BasicTabbedPaneUI.java:
	(calculateSizes): Return real width and height.

2004-03-23  Kim Ho  <kho@redhat.com>

	* javax/swing/plaf/basic/BasicTabbedPaneUI.java
	(calculateTabRects): Set the selectedRun before
	trying to rotate tabs.

2004-03-23  Kim Ho  <kho@redhat.com>

	* Makefile.am: New file
	* Makefile.in: Regenerate
	* java/awt/Graphics.java: (drawRect):
	Draw to the correct point.
	* javax/swing/DefaultSingleSelectionModel.java
	(isSelected): Return true if the selected index
	is not -1.
	* javax/swing/JLabel.java: Do not change mnemonic
	index if text is null.
	* javax/swing/JProgressBar.java: Use JComponent's
	EventListenerList.
	* javax/swing/JScrollBar.java: Ditto.
	* javax/swing/JSlider.java: Ditto.
	* javax/swing/JTabbedPane.java: Reimplement.
	* javax/swing/plaf/basic/BasicLookAndFeel.java:
	Add defaults for TabbedPane.
	* javax/swing/plaf/basic/BasicArrowButton.java:
	Implement
	* javax/swing/plaf/basic/BasicProgressBarUI.java:
	(paintDeterminate): Don't paint String if it's
	empty.
	(paintIndeterminate): ditto.
	* javax/swing/plaf/basic/BasicTabbedPaneUI.java:
	Reimplement.

2004-03-19  Michael Koch  <konqueror@gmx.de>

	* java/awt/image/AffineTransformOp.java
	(AffineTransformOp): Made public.
	* javax/swing/JComponent.java
	(listenerList): Made protected.
	(accessibleContext): Likewise.
	* javax/swing/JList.java
	(valueChanged): Dont use internal fields of ListSelectionEvent.
	* javax/swing/JViewport.java
	(getView): Dont use internal fields of Component.
	(addImpl): Likewise.
	* javax/swing/Timer.java
	(isRunning): Made public.
	(start): Likewise.
	(stop): Likewise.
	* javax/swing/UIDefaults.java
	(getInt): Made public.
	* javax/swing/plaf/basic/BasicListUI.java
	(mousePressed): Dont use internal fields of MouseEvent.
	(propertyChanged): Dont use internal fields of PropertyChangeEvent.
	* javax/swing/plaf/basic/BasicScrollBarUI.java
	(arrowIcon): Made static.
	* javax/swing/plaf/basic/BasicViewportUI.java
	(stateChanged): Dont use internal field on ChangeEvent.
	* javax/swing/text/JTextComponent.java
	(getUI): Call UIManager.getUI().
	(updateUI): Use getUI().

2004-03-19  Graydon Hoare  <graydon@redhat.com>

	* javax/swing/JComponent.java: Turn off double buffer by default.
	* javax/swing/plaf/basic/BasicViewportUI.java: Clear rects before painting.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c
	(Java_gnu_java_awt_peer_gtk_GdkGraphics2D_gdkDrawDrawable):
	Use cairo to copy areas.
	(Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoClip):
	Initialize and set clip region.

2004-03-15  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* java/applet/Applet.java (preferredSize): Override deprecated
	variant of getPreferredSize.
	(minimumSize): Override deprecated variant of getMinimumSize.

2004-03-15  Olga Rodimina  <rodimina@redhat.com>

	* gnu/java/awt/peer/gtk/GdkGraphics2D.java
	(drawImage(img,xform,bgcolor,obs)): New Method.
	Helper function that every drawImage method will
	use.
	(drawRaster): Added new parameter, bgcolor. All
	transparent pixels are changed to bgcolor before
	image is drawn.
	(drawRenderedImage): Fixed to use changed drawRaster().
	(drawImage(image,xform,obs): Fixed to use new helper function
	(drawImage(image,op,x,y)): Ditto.
	(drawImage (img,x,y,observer)): Ditto.
	((PainterThread) bgcolor): New Field.
	((PainterThread) (setPixels)): Changed all transparent pixels
	to bgcolor.
	(drawImage(img,x,y,width,height,bgcolor,observer)):
	Fixed FIXME - all the transparent pixels are
	changed to the specified bgcolor.
	(drawImage(img, x, y, width, height, observer): Changed to
	use function above.
	(drawImage (img,dx1,dy1,dx2,dy2,sx1,sy1,sx2,sy2,bgcolor,observer)):
	Fixed FIXME- changed all transparent pixels to bgcolor.
	(drawImage (img, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, observer)):
	Changed to use function above.

2004-03-14  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* java/applet/Applet.java (dimensions): New field.
	(getDimensions): New method.
	(getPreferredSize): Call getDimensions.
	(getMinimumSize): Likewise.

2004-03-13  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* jni/classpath/jcl.c: Include stdlib.h, not malloc.h.
	* jni/classpath/jnilink.c: Likewise.

	* java/applet/Applet.java (getPreferredSize): New method.
	(getMinimumSize): New method.

From-SVN: r80762
2004-04-16 18:44:45 +00:00
Bryce McKinlay 245c3c04af prims.cc (_Jv_AllocObject): Remove `size' argument.
libjava:
2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>

	* prims.cc (_Jv_AllocObject): Remove `size' argument.
	(_Jv_AllocObjectNoFinalizer): Likewise.
	(_Jv_AllocObjectNoInitNoFinalizer): Likewise.
	(_Jv_AllocPtrFreeObject): Likewise.
	(_Jv_AllocString): Moved from natString.cc. Call collector interface
	directly even in the JVMPI case.
	* gcj/cni.h (JvAllocObject): Remove `size' argument from
	_Jv_AllocObject calls.
	* gcj/javaprims.h: Update prototypes.
	* gnu/gcj/natCore.cc (_Jv_create_core): Use `new', not
	_Jv_AllocObject.
	* java/lang/Class.h: Update _Jv_AllocObject friend prototype.
	* java/lang/natString.cc (_Jv_AllocString): Move to prims.cc.

gcc/cp:
2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>

	* init.c (build_new_1): Don't use type size argument for Java
	_Jv_AllocObject call.

gcc/java:
2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>

	* expr.c (expand_java_NEW): Don't use size argument for
	_Jv_AllocObject calls.
	* parse.y (patch_invoke): Likewise.

From-SVN: r80754
2004-04-16 17:27:19 +01:00
Ranjit Mathew 84264cb69e VMThrowable.java (getStackTrace): Pass trace as-is to modified lookup().
* java/lang/VMThrowable.java (getStackTrace): Pass trace as-is to
	modified lookup().
	* gnu/gcj/runtime/NameFinder.java (lookup): Change to take in a
	StackTraceElement directly.
	(newElement): New native helper method to create StackTraceElement
	bypassing Java access control.
	(createStackTraceElement): Use newElement() instead of directly
	calling StackTraceElement's constructor.
	* gnu/gcj/runtime/natNameFinder.cc (newElement): New method.

From-SVN: r80541
2004-04-09 04:39:24 +00:00
Norbert Frese f903e73b80 RMIIncomingThread.java: New file.
2004-03-20  Norbert Frese  <postfach@nfrese.net>

	* gnu/java/rmi/server/RMIIncomingThread.java: New file.
	* gcc/libjava/gnu/java/rmi/server/UnicastConnection.java:
	Create a new RMIObjectOuputStream/RMIObjectInputStream for every
	rmi-message.
	(getObjectInputStream): Return object reference, throw IOException if null.
	(startObjectInputStream): Create new RMIObjectInputStream on top of 'din'.
	(getObjectOutputStream): Return object reference, throw IOException if null.
	(startObjectOutputStream): Create new RMIObjectOutputStream on top of 'dout'.
	* gcc/libjava/gnu/java/rmi/server/UnicastConnectionManager.java:
	(UnicastConnectionManager): Throw RemoteException if port is not available.
	(getInstance): Throw RemoteException.
	(run): Lookup client host and attach it to new RMIIncomingThread for later retrieval.
	* gcc/libjava/gnu/java/rmi/server/UnicastRef.java:
	Start a new RMIObjectInputStream/RMIObjectOutputStream for every rmi-message.
	Collect Exceptions which are returned by a rmi-call and fix void returns.
	* gcc/libjava/gnu/java/rmi/server/UnicastRemoteCall.java:
	Start a new RMIObjectInputStream/RMIObjectOutputStream for every rmi-message.
	* gcc/libjava/gnu/java/rmi/server/UnicastServer.java:
	(dispatch): Answer ping messages which are sent by other java implementions.
	(incomingMessageCall): Start a new RMIObjectInputStream/RMIObjectOutputStream
	for every rmi-message and fix void return problems.
	* gcc/libjava/gnu/java/rmi/server/UnicastServerRef.java
	(UnicastServerRef): Throw RemoteException.
	(exportObject): Find the class up the class hierarchy which has a _Stub generated by rmic.
	In some situations it is necessary to export a subclass of the class which has the _Stub.
	For instance when the class with has the _Stub is abstract.
	(findStubSkelClass): New method which looks for the class which has the _Stub.
	(getClientHost): Implementated.
	* gcc/libjava/java/rmi/server/RemoteServer.java
	(getClientHost): Implementated.
	* gcc/libjava/Makefile.am (rmi_java_source_files):
	Added gnu/java/rmi/server/RMIIncomingThread.java.
	* Makefile.in: Regenerated.

From-SVN: r79755
2004-03-20 20:30:56 +00:00
Per Bothner ab16524d62 configure.in: FILE variable overrides FLATFORM when linking natFileChannelXXX.cc.
* configure.in: FILE variable  overrides FLATFORM when linking
	natFileChannelXXX.cc.

	* gnu/java/nio/channels/natFileChannelEcos.cc (diag_write):  Restored.
	(write):  Call diag_write, as in old natFileDescriptorEcos.cc.

From-SVN: r79731
2004-03-19 22:06:12 -08:00
Per Bothner 0fca95f56f Input_UnicodeBig.java: New class..
* gnu/gcj/convert/Input_UnicodeBig.java:  New class..
	* gnu/gcj/convert/Input_UnicodeLittle.java:  New class.
	* Makefile.am:  Update accordingly.
	* gnu/gcj/convert/IOConverter.java:  Define "utf-16le" and "utf16be"
	as aliases for UnicodeLittle and UnicodeBig.

From-SVN: r79723
2004-03-19 16:24:49 -08:00
Rainer Orth acc63e4c3d natFileChannelPosix.cc (mapImpl): Cast MAP_FAILED to void *.
* gnu/java/nio/channels/natFileChannelPosix.cc (mapImpl): Cast
	MAP_FAILED to void *.

From-SVN: r79627
2004-03-18 17:23:53 +00:00
Graydon Hoare 86881a7b54 [multiple changes]
2004-03-12  Graydon Hoare  <graydon@redhat.com>

	* gnu/java/awt/peer/gtk/GdkGraphics2D.java: Clipping fixes.
	* javax/swing/JComponent.java (paint): Use persistent double buffer.
	* javax/swing/JList.java (ListListener): Revalidate on changes.
	* javax/swing/JScrollPane.java: Reimplement.
	* javax/swing/JViewport.java: Reimplement.
	* javax/swing/ScrollPaneLayout.java: Reimplement.
	* javax/swing/ViewportLayout.java: Tidy up.
	* javax/swing/plaf/basic/BasicButtonListener.java: Remove printlns.
	* javax/swing/plaf/basic/BasicScrollPaneUI.java: Reimplement.
	* javax/swing/plaf/basic/BasicSliderUI.java: Handle missing labels.
	* javax/swing/plaf/basic/BasicViewportUI.java: Implement in terms of
	backing store only.

2004-03-11  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
	(window_wm_protocols_filter): New function.
	(window_focus_in_cb): Remove function.
	(window_focus_out_cb): Likewise.
	(window_focus_or_active_state_change_cb): New function.
	(create): Add filter that removes WM_TAKE_FOCUS client messages.
	(connectSignals): Don't attach handlers to focus-in-event or
	focus-out-event signals.  Handle notify signal.

2004-03-11  David Jee  <djee@redhat.com>

	* gnu/java/awt/peer/gtk/GtkCheckboxPeer.java
	(gtkSetLabel): New native method declaration.
	(setLabel): Use gtkSetLabel.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c
	(Java_gnu_java_awt_peer_gtk_GtkCheckboxPeer_gtkSetLabel): New method.

2004-03-10  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* gnu/java/awt/peer/gtk/GdkGraphics.java (setColor): Default to
	black when color argument is null.

2004-03-10  Kim Ho  <kho@redhat.com>

	* java/awt/Container.java: Remove check
	for drag events.

2004-03-10  Kim Ho  <kho@redhat.com>

	* java/awt/Container.java: (visitChild):
	Remove candidate clip. Use the component
	clip to intersect.
	* gnu/java/awt/peer/gtk/GtkComponentPeer.java:
	(handleEvent): Use the PaintEvent's clip.

2004-03-10  Kim Ho  <kho@redhat.com>

	* gnu/java/awt/peer/gtk/GtkComponentPeer.java:
	(handleEvent): Don't set the clip for the
	Graphics object.

2004-03-09  Graydon Hoare  <graydon@redhat.com>

	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGlyphVector.c:
	Fix double <-> fixed macros, reset font transform.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeerMetrics.c:
	Likewise.

2004-03-09�� Kim Ho  <kho@redhat.com>

	* java/awt/Container.java: (visitChild): Move
	the x and y coordinate of the component rectangle
	to correct position.
	(handleEvent): Forward drag events to the pressed
	component.
	* javax/swing/plaf/basic/BasicScrollBarUI.java:
	Fix comments.
	(ArrowButtonListener::mousePressed): Stop the
	existing timer.
	(mouseDragged): Implement.
	(TrackListener::mousePressed): Only react if
	the press doesn't occur on the thumb, otherwise
	just set the offset.
	(TrackListener::mouseReleased): Unset the isAdjusting
	value.
	(createIncreaseIcon): Switch icon.
	(createDecreaseIcon): Switch icon.
	(calculatePreferredSize): Use width.
	(getThumbBounds): Use the top as the lower value.
	(layoutVScrollBar): Switch the button locations.
	(paintIncreaseHighlight): Paint correct side of thumb.
	(paintDecreaseHighlight): ditto.
	(valueForYPosition): Use top as the lower value.
	* javax/swing/plaf/basic/BasicSliderUI.java:
	Fix comments.
	(mouseDragged): Implement.
	(mousePressed): Only react when the thumb isn't
	pressed, otherwise just set offset.
	(mouseReleased): Handle a release of the thumb.
	(scrollDueToClickInTrack): Stop the timer first.
	* javax/swing/JProgressBar.java:
	(setString): Fix change condition.
	* javax/swing/JSeparator.java:
	Remove println's.

2004-03-08  David Jee  <djee@redhat.com>

	* java/awt/image/AffineTransformOp.java:
	(filter): Use Graphics2D interface instead of directly using the
	GdkGraphics2D peer.

2004-03-05  David Jee  <djee@redhat.com>

	* gnu/java/awt/peer/gtk/GtkButtonPeer.java
	(handleEvent): Action events are generated upon MOUSE_RELEASED.
	* java/awt/Container.java
	(acquireComponentForMouseEvent): Fixed.
	(handleEvent): Fixed.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c
	(state_to_awt_mods_with_button_states): New method.
	(pre_event_handler): Fixed mouse event generation.

2004-03-05  Olga Rodimina  <rodimina@redhat.com>

	gnu/java/awt/peer/gtk/GdkGraphics2D.java
	(GdkGraphics2D (BufferedImage)): Initialize
	pixmap associated with specified BufferedImage.
	(setPaint): Changed implementation of Texture
	Paint to use AffineTransformOp.
	* java/awt/image/AffineTransformOp.java
	(createCompatibleDestRaster): Throw RasterFormatException
	if resulting width or height of raster is 0.

2004-03-04  Olga Rodimina  <rodimina@redhat.com>

	* java/awt/image/AffineTransformOp.java:
	Removed unnecessary field interpolationType.
	Formatted some of the lines to be consistent with
	the GNU style.
	(AffineTransformOp): Create new RenderingHints
	containing specified interpolation type.
	(createCompatibleDestImage): Implemented.
	(createCompatibleDestRaster): Implemented.
	(filter): Implemented.
	(getBounds2D(BufferedImage)): Implemented.
	(getBounds2D(Raster)): Implemented.
	(getInterpolationType): Get interpolation value from
	rendering hints.

2004-03-04  David Jee  <djee@redhat.com>

	* gnu/java/awt/peer/gtk/GtkContainerPeer.java
	(setFont): Check if child peers are null.

2004-03-04  Graydon Hoare  <graydon@redhat.com>

	* testsuite/lib/libjava.exp (libjava_find_lib): Don't include
	.libs in -L option.
	(libjava_arguments): Add new libraries to argument list.

2004-03-04  Tom Tromey  <tromey@redhat.com>

	* Makefile.in: Rebuilt.
	* Makefile.am (toolexeclib_LTLIBRARIES): Added lib-java-awt.la,
	lib-javax-swing.la, lib-java-applet.la, lib-java-beans.la.
	(misc_java_source_files): New macro.
	(swing_java_source_files): Likewise.
	(awt_java_source_files): Pruned.
	(applet_java_source_files): New macro.
	(beans_java_source_files): Likewise.
	(lib_java_applet_la_SOURCES): Likewise.
	(lib_java_awt_la_SOURCES): Likewise.
	(lib_javax_swing_la_SOURCES): Likewise.
	(lib_java_beans_la_SOURCES): Likewise.
	(all_java_object_files): Likewise.
	(%.lo: %.java): Use all_java_object_files.
	(all_java_source_files): Added new _SOURCES.
	(ordinary_java_source_files): Removed awt_java_source_files.

2004-03-02  Olga Rodimina  <rodimina@redhat.com>

	* Makefile.am: Added java/awt/image/AffineTransformOp.java
	* Makefile.in: Re-generated.
	* java/awt/image/AffineTransformOp.java: New Class.

2004-03-01  Olga Rodimina  <rodimina@redhat.com>

	* gnu/java/awt/peer/gtk/GdkGraphics2D.java
	(setPaint): Interpret correctly TexturePaint's
	anchor rectangle.
	(drawImage): Fixed scale factors of the affine
	transform.

2004-02-27  David Jee  <djee@redhat.com>

	* gnu/java/awt/peer/gtk/GdkGraphics.java
	(GdkGraphics(Component)): Inherit font from component.
	(drawString): Use font style.
	* gnu/java/awt/peer/gtk/GtkCheckboxPeer.java
	(gtkSetFont): New native method declaration.
	(setFont): New method.
	* gnu/java/awt/peer/gtk/GtkComponentPeer.java
	(gtkSetFont): New native method declaration.
	(setFont): Call new native method gtkSetFont.
	* gnu/java/awt/peer/gtk/GtkContainerPeer.java
	(setFont): For all child components who do not their fonts set,
        set their peers' fonts with this container's font.
	* gnu/java/awt/peer/gtk/GtkLabelPeer.java:
	Move all native method declarations to the top for readability.
	(gtkSetFont): New native method declaration.
	(setFont): New method.
	* java/awt/Component.java
	(setFont): Invalidate after setting the font.
	* java/awt/Container.java
	(invalidateTree): New method.
	(setFont): Invalidate the container tree after setting the font.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c
	(Java_gnu_java_awt_peer_gtk_GdkGraphics_drawString): Use font style.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c
	(Java_gnu_java_awt_peer_gtk_GtkCheckboxPeer_gtkSetFont): New method.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
	(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkSetFont): New method.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c
	(Java_gnu_java_awt_peer_gtk_GtkLabelPeer_gtkSetFont): New method.

2004-02-27  Olga Rodimina <rodimina@redhat.com>

	* gnu/java/awt/peer/gtk/GdkGraphics2D.java
	(updateBufferedImage): New helper function.
	Updates BufferedImage in memory if it was changed.
	(draw): changed to update BufferedImage in memory after
	this drawing operation
	(fill): Ditto.
	(draw3DRect): Ditto.
	(fill3DRect): Ditto.
	(clearRect): Ditto.
	(drawRaster): Ditto.
	(drawImage) : Ditto. Update only in case of GtkOffScreenImage with
	no affine transformation.
	(drawGlyphVector): Ditto.

2004-02-26  Olga Rodimina <rodimina@redhat.com>

	* gnu/java/awt/peer/gtk/GdkGraphics2D.java
	(isBufferedImageGraphics): New Helper function.
	Returns true if this graphics2d can be used to draw
	into buffered image and false otherwise.
	(updateImagePixels): New Helper function.
	Updates pixels in the BufferedImage.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c
	(getImagePixels): New function. Returns pixels
	of the buffered image associated with
	this Graphics2D.

2004-02-26  David Jee  <djee@redhat.com>

	* java/awt/BorderLayout.java
	(layoutContainer): Fix width and height calculations to ensure
	that they're non-negative.
	* java/awt/Component.java
	(setBackground): If c is null, inherit from closest ancestor whose
	background color is set.

2004-02-26�� Kim Ho�� <kho@redhat.com>

	* Makefile.am: Add new files.
	* Makefile.in: Re-generate.
	* javax/swing/JProgressBar.java:
	(JProgressBar(int, int int)): Throw
	IllegalArgumentException if orientation is
	invalid.
	(JProgressBar(BoundedRangeModel)): Create
	ChangeListener and register it. UpdateUI.
	(getChangeListeners): Implement.
	(setModel): Reset ChangeListener.
	* javax/swing/JScrollBar.java: Implement.
	* javax/swing/JSeparator.java: Implement.
	* javax/swing/JSlider.java:
	(JSlider(int, int, int, int)): Throw
	IllegalArgumentException if orientation
	is invalid.
	(getChangeListeners): Fix method name.
	* javax/swing/SwingUtilities.java:
	(layoutCompoundLabel): If there is no text,
	set the text rectangle dimensions to 0.
	* javax/swing/plaf/basic/BasicButtonUI.java:
	(paint): If there is no text, don't paint it.
	* javax/swing/plaf/basic/BasicScrollBarUI.java:
	Implement.
	* javax/swing/plaf/basic/BasicSeparatorUI.java:
	Implement.
	* javax/swing/plaf/basic/BasicSliderUI.java:
	(propertyChange): If the model changes, change
	the listeners accordingly.

2004-02-25  Graydon Hoare  <graydon@redhat.com>

	* javax/swing/AbstractButton.java: Add "final" qualifiers.
	* javax/swing/JList.java: Reimplement.
	* javax/swing/DefaultListSelectionModel.java: Reimplement.
	* javax/swing/plaf/basic/BasicListUI.java: Reimplement.
	* javax/swing/plaf/basic/BasicLookAndFeel.java: Add "purple" values.
	* javax/swing/ListModel.java: Javadoc.
	* javax/swing/ListSelectionModel.java: Add missing methods.
	* javax/swing/AbstractListModel.java: Javadoc and corrections.
	* javax/swing/DefaultListModel.java: Javadoc and corrections.
	* javax/swing/ListModel.java: Javadoc and corrections.
	* javax/swing/DefaultListCellRenderer.java: Minor tidying.

2004-02-25  David Jee  <djee@redhat.com>

	* gnu/java/awt/peer/gtk/GtkFontPeer.java
	(GtkFontPeer): Change default size to 12.
	* gnu/java/awt/peer/gtk/GtkToolkit.java
	(getFontPeer): Change default size to 12.
	(getClasspathFontPeer): Likewise. Set default name to "Default".
	* java/awt/Font.java
	(Font(Map)): Call Font(String,Map).
	(Font(String,Map)): If attrs is null, initialize it as an empty
	HashMap, which will ensure that the Font will get default attributes.

2004-02-25  David Jee  <djee@redhat.com>

	* gnu/java/awt/peer/gtk/GtkFontPeer.java
	(GtkFontPeer(String,int)): Call the new constructor with size 1.
	(GtkFontPeer(String,int,int)): New constructor with size attribute.
	* gnu/java/awt/peer/gtk/GtkToolkit.java
	(getFontPeer(String,int)): Call the new overload method with size 1.
	(getFontPeer(String,int,int)): New method. Overloaded with size
	attribute.
	(getClasspathFontPeer): Set the size of the font.

2004-02-24  Olga Rodimina  <rodimina@redhat.com>

	* gnu/java/awt/peer/gtk/GdkGraphics2D.java
	(bimage): New field.
	(GdkGraphics2D): New Constructor. Constructs Graphics
	object that can be used to draw into the Buffered Image.
	* gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java:
	(GdkGraphicsEnvironment): Fixed to include public
	keyword.
	(createGraphics): Implemented.
	* gnu/java/awt/peer/gtk/GtkToolkit.java
	(getLocalGraphicsEnvironment): Implemented.
	* java/awt/GraphicsEnvironment.java:
	(getLocalGraphicsEnvironment): Implemented.
	* java/awt/image/BufferedImage.java:
	(createGraphics): Implemented.

2004-02-24  David Jee  <djee@redhat.com>

	* java/awt/Component.java
	(eventTypeEnabled): Add MOUSE_MOVED and MOUSE_DRAGGED event types.
	* java/awt/Container.java
	(addNotifyContainerChildren): Fix event enabling.

2004-02-23  Olga Rodimina  <rodimina@redhat.com>

	* Makefile.am: Added
	gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java
	* Makefile.in: Re-generated.
	* gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java:
	New Class.

2004-02-19  Kim Ho  <kho@redhat.com>

	* Makefile.am: Add BasicProgressBarUI
	* Makefile.in: Regenerate.
	* javax/swing/JProgressBar.java:
	Re-implement.
	* javax/swing/plaf/basic/BasicLookAndFeel.java
	Add constants for JProgressBar.
	* javax/swing/plaf/basic/BasicProgressBarUI.java
	Implement.
	* javax/swing/plaf/basic/BasicSliderUI.java
	Change comments.
	(calculateGeometry): New method
	(paint): Remove unnecessary size calculations.

2004-02-18  Olga Rodimina  <rodimina@redhat.com>

	* gnu/java/awt/peer/gtk/GdkGraphics2D.java
	(drawRaster): Fixed small error that caused
	imageToUser transformation to be set incorrectly.
	(toString): Implemented.

2004-02-18  David Jee  <djee@redhat.com>

	* java/awt/CardLayout.java
	(addLayoutComponent): Show the first component added as the default.
	(removeLayoutComponent): After removing, show the next component.
	(gotoComponent): If there is only one component, show it and return.

2004-02-18  Kim Ho  <kho@redhat.com>

	* javax/swing/JSlider.java: Re-order
	modifiers.
	* javax/swing/JLabel.java: Re-order
	modifiers.
	* javax/swing/JComponent.java:
	(addPropertyChangeListener):
	Implement.
	(removePropertyChangeListener):
	ditto.
	(firePropertyChangeEvent):
	ditto.

2004-02-17  David Jee  <djee@redhat.com>

	* java/awt/Component.java
	(show): Dispatch ComponentEvent via system event queue.
	(hide): Likewise.
	(move): Likewise.
	(resize): Likewise.
	(reshape): Likewise.
	* java/awt/Window.java
	(setBoundsCallback): Likewise.

2004-02-17  David Jee  <djee@redhat.com>

	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
	(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_setNativeBounds):
	Use gtk_widget_set_size_request() instead of the deprecated
	gtk_widget_set_usize().

2004-02-17  Kim Ho  <kho@redhat.com>

	* javax/swing/JSlider.java: Fix comments and
	make property strings constants.
	(createStandardLabels): Use the labels
	preferred size as bounds.
	* javax/swing/plaf/basic/BasicSliderUI.java
	Fix comments.
	(ScrollHandler::actionPerformed): Don't
	calculate the timer stop value. Let the
	MouseListeners find the stop location.
	(getPreferredHorizontalSize): Re-implement.
	(getPreferredVerticalSize): ditto.
	(getMinimumHorizontalSize): ditto.
	(getMinimumVerticalSize): ditto.
	(getPreferredSize): ditto.
	(getMinimumSize): ditto.
	(getMaximumSize): ditto.
	(paintTicks): Use doubles to find the
	tick location.
	(paintHorizontalLabel):�� Use preferredSize
	as initial width and height.
	(paintVerticalLabel): ditto.

2004-02-17  Kim Ho  <kho@redhat.com>

	* javax/swing/JLabel.java: Changed
	property strings to constants.
	(DISPLAYED_MNEMONIC_INDEX_CHANGED_PROPERTY):
	New property.
	(setText): Change mnemonic index if
	text is too short.
	(setDisplayedMnemonicIndex): Fire property
	change event.
	(getDisplayedMnemonicIndex): Remove check
	against short text.

2004-02-17 Olga Rodimina <rodimina@redhat.com>

	* gnu/java/awt/peer/gtk/GdkGraphics2D.java:
	(drawImage(img,xform,obs)): Invert xform before
	passing the xform to cairo.
	(drawImage(img,x,y,bgcolor,obs)): Implemented.
	(drawImage (img,x,y,w,h,bgcolor,obs)): Partly
	implemented.
	(drawImage (img,x,y,w,h,obs)): Implemented.
	(drawImage (img,dx1,dy1,dx2,dy2,sx1,sy1,sx2,sy2,
	bgcolor,obs)): Partly implemented.
	(drawImage (img,dx1,dy1,dx2,dy2,sx1,sy1,sx2,sy2,obs)):
	Implemented.
	* java/awt/image/BufferedImage.java:
	(copyData): if dest is null, create raster with same
	dimensions as the current image.

2004-02-16  Graydon Hoare  <graydon@redhat.com>

	* javax/swing/plaf/basic/BasicLabelUI.java
	(getPreferredSize): Use layoutCL.
	* javax/swing/plaf/basic/BasicGraphicsUtils.java
	(getPreferredButtonSize): Start with empty view rect, layout using
	component's preferred alignment.
	* javax/swing/plaf/basic/BasicLookAndFeel.java: Add some Label and
	List defaults.

2004-02-16  David Jee  <djee@redhat.com>

	* java/awt/Component.java
	(show): Dispatch COMPONENT_SHOWN ComponentEvent.
	(hide): Dispatch COMPONENT_HIDDEN ComponentEvent.
	(move): Erase old bounds and repaint new bounds. Dispatch
	COMPONENT_MOVED ComponentEvent.
	(resize): Erase old bounds and repaint new bounds. Dispatch
	COMPONENT_RESIZED ComponentEvent.
	(reshape): Dispatch COMPONENT_RESIZED and COMPONENT_MOVED
	ComponentEvents.
	* java/awt/Window.java
	(setBoundsCallback): Dispatch COMPONENT_RESIZED and COMPONENT_MOVED
	ComponentEvents.

2004-02-16  Olga Rodimina  <rodimina@redhat.com>

	* gnu/java/awt/peer/gtk/GdkGraphics2D.java:
	(setRenderingHint): Added implementation of
	Interpolation rendering hints.
	(setRenderingHints): Ditto.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c:
	(drawPixels): fixed to allow user to choose type
	of filtering that should be used when displaying images.
	(cairoSurfaceSetFilter): New method. Sets filter type for
	interpolation of pixel values.

2004-02-16  David Jee  <djee@redhat.com>

	* java/awt/GridBagLayout.java
	(calcCellSizes): Rows or columns with zero sizes should still be
	considered for extra space distribution.

2004-02-16  Kim Ho  <kho@redhat.com>

	* javax/swing/JLabel.java: Re-implement.
	* javax/swing/plaf/basic/BasicLabelUI.java
	Re-implement.
	* javax/swing/plaf/basic/BasicLookAndFeel.java:
	Added constant.

2004-02-16�� Kim Ho�� <kho@redhat.com>

	* javax/swing/JSlider.java: Fix indentation and comments.
	(setModel): Remove null check to conform with Sun's.
	(setOrientation): Throw exception if not
	HORIZONTAL or VERTICAL.
	(getInverted): Use private variable instead of
	ComponentOrientation.
	(setInverted): ditto.
	* javax/swing/plaf/basic/BasicSliderUI.java:
	Fix indentation and comments.
	(propertyChange): Remove check for inverted slider, handle
	in main paint.
	(getMinimumSize): Return preferred size.
	(getMaximumSize): ditto.
	(calculateFocusRect): Don't relocate rectangle.
	(drawInverted): Return XOR of the slider's inversion and
	the component's orientation.
	(paint): Update leftToRightCache

2004-02-13  David Jee  <djee@redhat.com>

	* java/awt/GridBagLayout.java
	(GetLayoutInfo): Fix weight and size distribution. Relocate repeated
	code to helper methods.
	(sortBySpan): New helper method.
	(distributeSizeAndWeight): Likewise.
	(calcCellWeights): Likewise.
	(calcCellSizes): Add comments.

2004-02-13  David Jee  <djee@redhat.com>

	* java/awt/Component.java
        (show): Only do something if component is invisible at the moment.
        (hide): Only do something if component is visible at the moment.
        (reshape): If lightweight, erase old bounds and repaint new bounds.

2004-02-13�� Kim Ho�� <kho@redhat.com>

	* Makefile.am: Updated for new file.
	* Makefile.in: Regenerated.
	* javax/swing/JSlider.java: Reimplement.
	* javax/swing/SwingUtilities.java
	(layoutCompoundLabel): Use icon height
	instead of width.
	(paintComponent): Implement.
	* javax/swing/plaf/basic/BasicLookAndFeel.java:
	Add JSlider defaults.
	* javax/swing/plaf/basic/BasicSliderUI.java:
	Implement. New file.

From-SVN: r79607
2004-03-17 21:29:02 +00:00
Michael Koch 3e368284ac 2004-03-17 Michael Koch <konqueror@gmx.de>
* gnu/java/net/PlainDatagramSocketImpl.java
	(RECEIVE_LOCK): New member field.
	(SEND_LOCK): New member field.
	(send0): New method.
	(send): Synchronize on SEND_LOCK.
	(receive0): New method.
	(receive): Synchronize on RECEIVE_LOCK.
	* gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
	gnu/java/net/natPlainDatagramSocketImplPosix.cc,
	gnu/java/net/natPlainDatagramSocketImplWin32.cc
	(send0): Renamed from send.
	(receive0): Renamed from receive.

From-SVN: r79579
2004-03-17 08:10:28 +00:00
Michael Koch aa18fb30ad 2004-03-17 Michael Koch <konqueror@gmx.de>
* gnu/java/net/natPlainSocketImplPosix.cc
	(write): Just call write(jbyteArray, offset, len).
	(read): Just call read(jbyteArray, offset, len).

From-SVN: r79578
2004-03-17 08:09:32 +00:00
Dalibor Topic 6828de5bff Reported by: Adam Heath <doogie@debian.org>
2004-03-16  Dalibor Topic  <robilad@kaffe.org>

	Reported by: Adam Heath <doogie@debian.org>
	* gnu/javax/rmi/CORBA/DelegateFactory.java (getInstance): Use context
	class loader.

From-SVN: r79528
2004-03-16 09:41:31 +00:00
Andreas Tobler 406c98b264 natFileChannelPosix.cc: Implement munmap_adaptor and msync_adaptor for older POSIX_C_SOURCES specs.
2004-03-14  Andreas Tobler <a.tobler@schweiz.ch>

	* gnu/java/nio/channels/natFileChannelPosix.cc: Implement
	munmap_adaptor and msync_adaptor for older POSIX_C_SOURCES specs.
	(MappedByteBufferImpl::unmapImpl): Use munmap_adaptor.
	(MappedByteBufferImpl::forceImpl): Use msync_adptor.

From-SVN: r79462
2004-03-14 00:07:58 +01:00
Michael Koch 950d83e765 2004-03-11 Michael Koch <konqueror@gmx.de>
* gnu/java/net/protocol/jar/Connection.java
	(getContentLength): New method.

From-SVN: r79332
2004-03-11 17:06:11 +00:00
Michael Koch fb36b57afc PlainSocketImpl.java: Reformated to merge better with classpath's version.
2004-03-11  Michael Koch  <konqueror@gmx.de>

	* gnu/java/net/PlainSocketImpl.java:
	Reformated to merge better with classpath's version.

From-SVN: r79331
2004-03-11 16:56:30 +00:00
Michael Koch 1a4f6839c0 natFileChannelEcos.cc: Totally reworked.
2004-03-11  Michael Koch  <konqueror@gmx.de>

	* gnu/java/nio/channels/natFileChannelEcos.cc: Totally reworked.
	This file was was just copied form java/io/natFileDescriptorEcos.cc
	and never changed to compile correctly.

From-SVN: r79320
2004-03-11 13:35:45 +00:00
Michael Koch 5ea438861c 2004-03-11 Michael Koch <konqueror@gmx.de>
* gnu/java/nio/PipeImpl.java
	(SourceChannelImpl): Made final.
	(read): Implemented.
	(SinkChannelImpl): Made final.
	(write): Implemented.

From-SVN: r79315
2004-03-11 08:49:29 +00:00
Michael Koch 9a282e8e59 PlainDatagramSocketImpl.java: Reformated to match classpath's version more.
2004-03-11  Michael Koch  <konqueror@gmx.de>

	* gnu/java/net/PlainDatagramSocketImpl.java:
	Reformated to match classpath's version more.

From-SVN: r79314
2004-03-11 08:47:52 +00:00
Michael Koch 1f2b471546 ClasspathFontPeer.java: Fixed javadoc to be correct xhtml.
2004-03-11  Michael Koch  <konqueror@gmx.de>

	* gnu/java/awt/peer/ClasspathFontPeer.java:
	Fixed javadoc to be correct xhtml.
	* gnu/java/awt/peer/gtk/GtkArgList.java
	(add): Use Boolean.valueOf() instead of new Boolean().

From-SVN: r79313
2004-03-11 08:44:18 +00:00
Anthony Green ec730df5fc Makefile.am: Build property resource files into libgcj.
2004-03-08  Anthony Green  <green@redhat.com>

	* Makefile.am: Build property resource files into libgcj.
	* Makefile.in: Rebuilt.
	* java/util/regex/Matcher.java, java/util/regex/Pattern.java,
	java/util/regex/PatternSyntaxException.java,
	gnu/regexp/CharIndexed.java,
	gnu/regexp/CharIndexedCharArray.java,
	gnu/regexp/CharIndexedInputStream.java,
	gnu/regexp/CharIndexedReader.java,
	gnu/regexp/CharIndexedString.java,
	gnu/regexp/CharIndexedStringBuffer.java, gnu/regexp/RE.java,
	gnu/regexp/REException.java,
	gnu/regexp/REFilterInputStream.java,
	gnu/regexp/REFilterReader.java, gnu/regexp/REMatch.java,
	gnu/regexp/REMatchEnumeration.java, gnu/regexp/RESyntax.java,
	gnu/regexp/REToken.java, gnu/regexp/RETokenAny.java,
	gnu/regexp/RETokenBackRef.java, gnu/regexp/RETokenChar.java,
	gnu/regexp/RETokenEnd.java, gnu/regexp/RETokenEndSub.java,
	gnu/regexp/RETokenLookAhead.java,
	gnu/regexp/RETokenOneOf.java, gnu/regexp/RETokenPOSIX.java,
	gnu/regexp/RETokenRange.java, gnu/regexp/RETokenRepeated.java,
	gnu/regexp/RETokenStart.java,
	gnu/regexp/RETokenWordBoundary.java,
	gnu/regexp/UncheckedRE.java: Files merged from GNU Classpath.

From-SVN: r79198
2004-03-09 19:14:23 +00:00
Per Bothner 3ae1e52c91 FileLockImpl.java (fd): Remove field, replacing it by:
* gnu/java/nio/FileLockImpl.java (fd):  Remove field, replacing it by:
	(ch):  New FileChannelImpl field.  Update constructor to match.
	(releaseImpl):  Remove native method.  Instead ...
	(release):  Call unlock on channel.
	* gnu/java/nio/natFileLockImpl.cc:  Removed file.

From-SVN: r78663
2004-02-29 11:13:45 -08:00
Per Bothner 612e660987 FileChannelImpl.java: New class, renamed from java/nio/channels.
* gnu/java/nio/channels/FileChannelImpl.java:  New class, renamed
	from java/nio/channels.  Don't depend on FileDescriptor.
	(in, out, err):  New static fields.
	(mode):  New field.
	(SET, CUR, READ, WRITE, APPEND, EXCL, SYNC, DSYNC):  Moved constants
	from FileDescriptor.
	(by):  Removed MappedByteBuffer field.
	(map):  New working implementation.
	* gnu/java/nio/channels/natFileChannelPosix.cc:  New file, though
	some code "ported" from natFileDescriptoPosix.cc.
	* gnu/java/nio/channels/natFileChannelEcos.cc:  Likewise.
	* gnu/java/nio/channels/natFileChannelWin32.cc  Likewise.

From-SVN: r78659
2004-02-29 11:09:28 -08:00
Michael Koch f57db409bc 2004-02-26 Michael Koch <konqueror@gmx.de>
* gnu/java/nio/FileLockImpl.java
	(finalize): Made protected.
	* java/nio/channels/FileChannel.java
	(MapMode.READ_ONLY): Made final.
	(MapMode.READ_WRITE): Made final.
	(MapMode.PRIVATE): Made final.
	* java/nio/channels/SocketChannel.java
	(open): Simplified code.
	* java/nio/channels/spi/AbstractSelectableChannel.java
	(registered): Unused, removed.
	(keyFor): Check channel is open, only locate key
	and not add a new one.
	(register): Don't delete attachments.

From-SVN: r78519
2004-02-26 19:45:51 +00:00
Michael Koch 135d78c600 2004-02-26 Michael Koch <konqueror@gmx.de>
* gnu/java/awt/ComponentDataBlitOp.java
	(INSTANCE): Made final.
	* gnu/java/awt/image/ImageDecoder.java:
	Reworked imports.
	(cm): Unused, removed.

From-SVN: r78517
2004-02-26 19:31:57 +00:00
Michael Koch 1287fd01cd 2004-02-26 Michael Koch <konqueror@gmx.de>
* gnu/java/nio/DatagramChannelImpl.java
	(send): Check if target address is resolved.

From-SVN: r78508
2004-02-26 17:17:19 +00:00
Michael Koch 821b56cbd6 Handler.java (): Removed unneeded check for file != null.
2004-02-20  Michael Koch  <konqueror@gmx.de>

	* gnu/java/net/protocol/jar/Handler.java
	(): Removed unneeded check for file != null. java.net.URL.getFile()
	returns an empty string but never null.

From-SVN: r78176
2004-02-20 17:19:03 +00:00
Michael Koch c6a6237687 2004-02-20 Michael Koch <konqueror@gmx.de>
* gnu/gcj/convert/Convert.java
	(main): Use equals() to compare strings.

From-SVN: r78174
2004-02-20 17:02:35 +00:00
Graydon Hoare 9288d11204 ToggleButtonModel.java: Remove dead class.
2004-02-09  Graydon Hoare  <graydon@redhat.com>

	* javax/swing/ToggleButtonModel.java: Remove dead class.
	* javax/swing/plaf/basic/BasicDefaults.java: Remove dead class.
	* javax/swing/plaf/basic/BasicButtonListener.java: New class.
	* javax/swing/plaf/basic/BasicRootPaneUI.java: New class.
	* Makefile.am: Update for new and removed files.
	* Makefile.in: Regenerate.

	* gnu/java/awt/peer/gtk/GdkGraphics2D.java: Initialize default hints.
	* javax/swing/AbstractButton.java
	(AbstractButton): Initialize fields correctly in ctor.
	* javax/swing/JCheckbox.java
	(JCheckBox): Override painting flags.
	* javax/swing/DefaultButtonModel.java: Conform to sun.
	* javax/swing/JComponent.java (paint): Fill with background color
	if available.
	(processComponentKeyEvent)
	(processFocusEvent)
	(processKeyEvent)
	(processMouseMotionEvent): Remove event-consuming empty methods.
	(getUIClassID): Return "ComponentUI" not "JComponent"
	* javax/swing/JFrame.java: Remove some debugging chatter.
	(JFrame): Subscribe to window events.
	* javax/swing/JRadioButton.java
	(JRadioButton): Override painting flags.
	* javax/swing/JRootPane.java
	(JRootPane): Set background from UIDefaults.
	* javax/swing/JToggleButton.java
	(ToggleButtonModel): New inner class.
	(JToggleButton): Override layout alighment.
	* javax/swing/SwingUtilities.java:
	(getLocalBounds): Return width and height, not x and y.
	(calculateInnerArea): Use local bounds, not bounds.
	(layoutCompoundLabel): Provide overridden form.
	(layoutCompoundLabel): Correct bugs.
	* javax/swing/UIDefaults.java: Correct comment.
	* javax/swing/plaf/basic/BasicButtonUI.java:
	Move most logic into defaults, external listener.
	(paintIcon): Implement icon painting.
	(paint): Fix state painting to conform to changes in model.
	* javax/swing/plaf/basic/BasicCheckBoxUI.java:
	Remove most dead/wrong methods.
	(getDefaultIcon): Return defaults.getIcon("CheckBox.icon").
	* javax/swing/plaf/basic/BasicIconFactory.java:
	(DummyIcon): New class.
	(getMenuItemCheckIcon)
	(getMenuItemArrowIcon)
	(getMenuArrowIcon)
	(getCheckBoxMenuItemIcon)
	(getRadioButtonMenuItemIcon)
	(createEmptyFrameIcon): Return DummyIcons, not null.
	(getCheckBoxIcon): Implement an icon that looks like sun's.
	(getRadioButtonIcon): Implement an icon that looks like sun's.
	* javax/swing/plaf/basic/BasicLookAndFeel.java
	(initComponentDefaults): Fix impossible values, add some missing.
	* javax/swing/plaf/basic/BasicPanelUI.java (gap): Remove field.
	* javax/swing/plaf/basic/BasicRadioButtonUI.java:
	Remove most dead/wrong methods.
	(icon): New field.
	(getDefaultIcon): New method.
	* javax/swing/plaf/basic/BasicToggleButtonUI.java:
	Remove most dead/wrong methods.
	* javax/swing/plaf/metal/MetalLookAndFeel.java
	(getDefaults): Return super.getDefaults(), not BasicDefaults.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c
	(Java_gnu_java_awt_peer_gtk_GdkGraphics_clearRect):
	Implement "clearing" as drawing, when on pixmap drawables.

	* javax/swing/JButton.java (getUIClassID):
	* javax/swing/JCheckBox.java (getUIClassID):
	* javax/swing/JEditorPane.java (getUIClassID):
	* javax/swing/JLabel.java (getUIClassID):
	* javax/swing/JList.java (getUIClassID):
	* javax/swing/JOptionPane.java (getUIClassID):
	* javax/swing/JPanel.java (getUIClassID):
	* javax/swing/JPasswordField.java (uiClassID):
	* javax/swing/JRadioButton.java (getUIClassID):
	* javax/swing/JRootPane.java (getUIClassID):
	* javax/swing/JScrollPane.java (getUIClassID):
	* javax/swing/JTabbedPane.java (getUIClassID):
	* javax/swing/JToggleButton.java (getUIClassID):
	* javax/swing/JTree.java (getUIClassID):
	* javax/swing/JViewport.java (getUIClassID):
	* javax/swing/text/JTextComponent.java (getUIClassID):
	Return "fooUI" not "Jfoo"

From-SVN: r77686
2004-02-12 00:17:26 +00:00
Michael Koch 5e673ed855 2004-02-10 Michael Koch <konqueror@gmx.de>
* gnu/java/awt/EmbeddedWindow.java
	(setHandle): Use java.awt.Component.getPeer() instead of
	java.awt.Component.peer directly.

From-SVN: r77605
2004-02-10 17:46:28 +00:00
David Jee 49d77e2275 2004-02-10 David Jee <djee@redhat.com>
* gnu/java/awt/peer/gtk/GtkButtonPeer.java
	(gtkSetLabel): New native method definition.
	(setLabel): Use gtkSetLabel.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c
	(Java_gnu_java_awt_peer_gtk_GtkButtonPeer_gtkSetLabel): New method.

From-SVN: r77604
2004-02-10 17:12:09 +00:00
Michael Koch 99814868c1 2004-02-05 Michael Koch <konqueror@gmx.de>
* gnu/java/nio/NIOServerSocket.java
	(impl): Unused, removed.
	* gnu/java/nio/SocketChannelImpl.java
	(finnishConnect): Don't throw NoConnectionPendingException if not
	connected or no connection pending.

From-SVN: r77317
2004-02-05 15:57:01 +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
Scott Gilbertson 5176577ddc Index: libjava/ChangeLog
from  Scott Gilbertson  <scottg@mantatest.com>

	* gnu/awt/xlib/XCanvasPeer.java (handleEvent): Implemented.

From-SVN: r76899
2004-01-29 22:11:26 +00:00
Scott Gilbertson bffff25795 Makefile.am: Added gnu/awt/xlib/XFontPeer.java.
* Makefile.am: Added gnu/awt/xlib/XFontPeer.java.
	* Makefile.in: Re-generated.
	* gnu/awt/xlib/XFontPeer.java: New file.
	* gnu/awt/xlib/XGraphics.java (setFont): Test for null font.
	(setClip): Commented out debug printout.
	* gnu/awt/xlib/XToolkit.java: Change superclass to ClasspathToolkit.
	(getFontPeer): Return XFontPeer.
	(getLocalGraphicsEnvironment): New method.
	(getClasspathFontPeer): New method.
	(createFont): New method.

From-SVN: r76891
2004-01-29 19:28:26 +00:00
Scott Gilbertson ef98992790 ClasspathFontPeer.java (getTransform): Never return null.
* gnu/java/awt/peer/ClasspathFontPeer.java (getTransform): Never
	return null.

From-SVN: r76874
2004-01-29 18:21:01 +00:00
Kim Ho 5efa76401e 2004-01-29 Kim Ho <kho@redhat.com>
* gnu/java/awt/peer/gtk/GtkFramePeer.java
        (gtkLayoutSetVisible): New method
        (setMenuBar): Hide layout before setting MenuBar
        and reshow it after.
        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
        (gtkLayoutSetVisible): Hide or show the Gtk Layout.

From-SVN: r76861
2004-01-29 14:34:31 +00:00
Michael Koch a54ca8cfca 2004-01-28 Michael Koch <konqueror@gmx.de>
* gnu/java/lang/ClassHelper.java
	(getPackagePortion): Removed.

From-SVN: r76809
2004-01-28 21:13:11 +00:00
David Jee 796e87a2b0 2004-01-28 David Jee <djee@redhat.com>
* gnu/java/awt/peer/gtk/GtkFramePeer.java
	(create): Set the default foreground color to
	java.awt.SystemColor.windowText.

From-SVN: r76792
2004-01-28 16:23:54 +00:00
Michael Koch 272c310d13 2004-01-27 Michael Koch <konqueror@gmx.de>
* gnu/java/awt/peer/gtk/GdkClasspathFontPeer.java,
	* gnu/java/awt/peer/gtk/GdkGlyphVector.java:
	Reindented to merge with classpath.

From-SVN: r76757
2004-01-27 22:42:24 +00:00
Michael Koch 128d836433 2004-01-27 Michael Koch <konqueror@gmx.de>
* gnu/java/net/protocol/http/Connection.java
	(getOutputStream): Fixed typo.

From-SVN: r76748
2004-01-27 21:05:29 +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
Kim Ho f256503705 GtkFramePeer.java (setMenuBar): Fix spacing.
2004-01-26  Kim Ho  <kho@redhat.com>

        * gnu/java/awt/peer/gtk/GtkFramePeer.java (setMenuBar):
        Fix spacing.

From-SVN: r76730
2004-01-27 16:43:12 +00:00
Kim Ho 57e1391773 GtkFramePeer.java (moveLayout): New method.
2004-01-26  Kim Ho  <kho@redhat.com>

        * gnu/java/awt/peer/gtk/GtkFramePeer.java (moveLayout): New
        method.
        (setMenuBar): Shift the Gtk layout up/down by the MenuBar
        height and let the Layout Managers readjust anything that
        needs to move.
        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
        (moveLayout): New method. Shift everything in the Gtk
        layout in the Y direction by an offset.

From-SVN: r76729
2004-01-27 16:39:45 +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
Kim Ho ecf67f46ef GtkFramePeer.java (menuBarHeight): Mark private.
2004-01-26  Kim Ho  <kho@redhat.com>

        * gnu/java/awt/peer/gtk/GtkFramePeer.java (menuBarHeight): Mark
        private.
        (setMenuBar): Grab MenuBar height and change insets.
        (setBounds): Account for MenuBar height.
        (postInsetsChangedEvent): Ditto.
        (postSizeAllocateEvent): Remove.
        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
        (menubar_resize_cb): Remove
        (setMenuBarPeer): Remove callback.
        (getMenuBarHeight): Use size requisition instead of
        allocation.

From-SVN: r76633
2004-01-26 13:56:59 +00:00
Thomas Fitzsimmons 0058a7d875 GtkToolkit.java (checkImage): Inform image observer of image loading status.
2004-01-25  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* gnu/java/awt/peer/gtk/GtkToolkit.java (checkImage): Inform
	image observer of image loading status.
	(getImage (String)): Start image production.
	(getImage (URL)): Likewise.

From-SVN: r76574
2004-01-25 18:29:42 +00:00
Michael Koch 8cd2bdca39 2004-01-24 Michael Koch <konqueror@gmx.de>
* gnu/java/net/protocol/jar/Connection.java
	(hdrHash): Removed.
	(hdrVec): Removed.
	(gotHeaders): Removed.
	(getHeaderField): Removed.
	(getHeaderFields): Removed.
	(getHeaderFieldKey): Removed.
	(getKey): Removed.
	(getField): Removed.
	(getHeaders): Removed.

From-SVN: r76523
2004-01-24 20:56:47 +00:00
Michael Koch 69f2de23b2 FileLockImpl.java: Compile fixes.
2004-01-23  Michael Koch  <konqueror@gmx.de>

	* gnu/java/nio/FileLockImpl.java: Compile fixes.

From-SVN: r76427
2004-01-23 15:53:51 +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 5d7b2198ba 2004-01-23 Michael Koch <konqueror@gmx.de>
* gnu/java/net/protocol/http/Connection.java
	(connect): Don't initialize bufferedOutputStream if not needed.
	(sendRequest): Set property for content length if content is present.
	Write content only if present.
	(getOutputStream): Check if already connected, dont connect,
	initalize bufferedOutputStream if needed.

From-SVN: r76412
2004-01-23 12:32:23 +00:00
Michael Koch 58cc478949 BitwiseXORComposite-1.png: New file.
2004-01-23  Michael Koch  <konqueror@gmx.de>

	* gnu/java/awt/doc-files/BitwiseXORComposite-1.png:
	New file.

From-SVN: r76410
2004-01-23 12:01:23 +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
Kim Ho 2bd408db4b GtkFramePeer.java (postConfigureEvent): Fix comments.
2004-01-21  Kim Ho  <kho@redhat.com>

        * gnu/java/awt/peer/gtk/GtkFramePeer.java (postConfigureEvent):
        Fix comments.
        (removeMenuBarPeer): Make package private.
        (setMenuBarPeer): Make package private.
        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
        (menubar_resize_cb): Mark attributes unused.
        (getMenuBarHeight): ditto.

From-SVN: r76299
2004-01-21 20:11:08 +00:00
Thomas Fitzsimmons c01c143789 GtkComponentPeer.java (setBounds): Calculate proper offsets for heavyweight components packed in lightweight...
2004-01-20  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* gnu/java/awt/peer/gtk/GtkComponentPeer.java (setBounds):
	Calculate proper offsets for heavyweight components packed in
	lightweight containers.

From-SVN: r76230
2004-01-20 21:24:09 +00:00
Thomas Fitzsimmons 9011501793 GtkTextFieldPeer.java, [...] (native create): Add width parameter.
2004-01-20  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* gnu/java/awt/peer/gtk/GtkTextFieldPeer.java,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.c
	(native create): Add width parameter.
	(create): Calculate text entry width based on current font's
	metrics and number of columns.  Set TextField's font if not
	already set.  Call native create.
	(gtkEntryGetBorderWidth): New native method.
	(gtkEntryGetSize): Remove method.
	(getMinimumSize): Call minimumSize.
	(getPreferredSize): Call preferredSize.
	(minimumSize): Calculate minimum size based on backing
	GtkEntry's borders, font metrics and number of columns.
	(preferredSize): Likewise for preferred size.
	(get_border_width): New static function.

From-SVN: r76228
2004-01-20 21:05:39 +00:00
Thomas Fitzsimmons cbc635173f GtkFramePeer.java (setResizable): Override GtkWindowPeer's setResizable method to account for menu bar height when...
2004-01-20  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* gnu/java/awt/peer/gtk/GtkFramePeer.java (setResizable):
	Override GtkWindowPeer's setResizable method to account for menu
	bar height when setting the frame's size.

From-SVN: r76227
2004-01-20 20:56:53 +00:00
Fernando Nasser 8f9f8d71c7 TestAWT.java (DialogWindow): Make text not visible so that dialog can be reused.
* gnu/java/awt/peer/gtk/TestAWT.java (DialogWindow): Make text not
        visible so that dialog can be reused.

From-SVN: r76160
2004-01-19 17:32:29 +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
Kim Ho 9543baba84 2004-01-16 Kim Ho <kho@redhat.com>
* gnu/java/awt/peer/gtk/GtkFileDialogPeer.java
        (gtkWidgetGetDimensions): Remove.
        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
        (gtkWidgetGetDimensions): Remove.

From-SVN: r76148
2004-01-19 14:08:19 +00:00
Kim Ho 2b8deefadd GtkComponentPeer.java (GtkComponentPeer): If it is a FileDialog and has dimensions of 0 by 0...
2004-01-16  Kim Ho  <kho@redhat.com>

        * gnu/java/awt/peer/gtk/GtkComponentPeer.java (GtkComponentPeer): If
        it is a FileDialog and has dimensions of 0 by 0, then the initial
        size is set to size request plus insets.
        * gnu/java/awt/peer/gtk/GtkFileDialogPeer.java
        (gtkWidgetGetDimensions): Override method.
        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
        (gtkWidgetGetDimensions): Override method. Returns size request plus
        insets.

From-SVN: r75993
2004-01-16 20:05:41 +00:00
Olga Rodimina f30dbd2039 * gnu/java/awt/peer/gtk/GdkGraphics2D.java:
(doPolygon): set fill rule of polygon to
	WIND_EVEN_ODD by default

From-SVN: r75971
2004-01-16 14:22:23 +00:00
Olga Rodimina b123101753 GdkGraphics2D.java: Implemented rendering hints related methods.
* gnu/java/awt/peer/gtk/GdkGraphics2D.java:
	Implemented rendering hints related methods.
	(getDefaultHints): New helper method. Returns
	default rendering hints.
	(walkPath): changed to normalize path if
	the KEY_STROKE_CONTROL key is in "normalize" mode.
	(draw3DRect): changed coordinates of rectangle by +0.5
	if in "normalize" mode.

From-SVN: r75943
2004-01-15 22:00:01 +00:00
Nathan Bryant 092b50e2d7 re PR libgcj/12001 (_Jv_FindClass dumps core when Oracle's classes12.zip in $CLASSPATH)
PR libgcj/12001:
	* gnu/gcj/runtime/VMClassLoader.java (VMClassLoader): Pass empty
	array to superclass.
	(init): Changed interface; add URLs here.
	(initialize): New static method.
	* prims.cc (_Jv_CreateJavaVM): Initialize ClassLoader here...
	(_Jv_RunMain): ... not here.

Co-Authored-By: Tom Tromey <tromey@redhat.com>

From-SVN: r75889
2004-01-14 22:49:58 +00:00
Thomas Fitzsimmons 9e2c04c59a GtkTextAreaPeer.java, [...] (native create): Add width and height parameters.
2004-01-13  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* gnu/java/awt/peer/gtk/GtkTextAreaPeer.java,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c
	(native	create): Add width and height parameters.  Set text
	view's size request according to new parameters.
	(create): Calculate text view size based on current font's
	metrics and number of rows and columns.  Set TextArea's font if
	not already set.  Call native create.
	(getMinimumSize): Call minimumSize.
	(getPreferredSize): Call preferredSize.
	(getHScrollbarHeight): New method.
	(getVScrollbarWidth): New method.
	(minimumSize): Calculate minimum size based on scrollbar
	visibility, scrollbar sizes, font metrics and number of rows and
	columns.
	(preferredSize): Likewise for preferred size.
	(gtkTextGetSize): Remove method.

From-SVN: r75817
2004-01-13 20:58:33 +00:00
Thomas Fitzsimmons db19e39b82 2004-01-13 Thomas Fitzsimmons <fitzsim@redhat.com>
* gnu/java/awt/peer/gtk/GtkComponentPeer.java
	(initializeInsets): Remove method.
	(GtkComponentPeer): Initialize insets field.  Remove call to
	initializeInsets.
	* gnu/java/awt/peer/gtk/GtkDialogPeer.java (initializeInsets):
	Remove method.
	* gnu/java/awt/peer/gtk/GtkFramePeer.java (initializeInsets):
	Remove method.
	* gnu/java/awt/peer/gtk/GtkWindowPeer.java,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c:
	(latestInsets): Remove field.
	(native create): Add insets parameter.  Call
	window_get_frame_extents.  Set the window's default size and
	size request based on its frame extents.
	(create): Initialize insets.
	(postInsetsChangedEvent): New method.
	(postConfigureEvent): Remove parameters top, left, bottom,
	right.  Remove insets-related logic.
	(connectJObject): Handle property-notify-event.
	(window_get_frame_extents, request_frame_extents,
	property_notify_predicate, window_property_changed_cb): New
	static functions.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c
	(pre_event_handler): Remove insets-related logic for configure
	events.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c (gtkInit):
	Update postConfigureEvent signature.

From-SVN: r75816
2004-01-13 20:54:46 +00:00
Fernando Nasser 81c740ba1b TestAWT.java (DialogWindow): Add WindowAdapter to handle Window "Closing" events.
* gnu/java/awt/peer/gtk/TestAWT.java (DialogWindow): Add WindowAdapter
        to handle Window "Closing" events.

From-SVN: r75813
2004-01-13 20:00:00 +00:00
David Jee e6cca48823 2004-01-13�� David Jee�� <djee@redhat.com>
* gnu/java/awt/peer/gtk/GtkContainerPeer.java
        (setBackground): New method. Children with no explicitly-set
        background will be repainted with the parent container's new
        background color.

From-SVN: r75809
2004-01-13 17:55:20 +00:00
Fernando Nasser e5baf3bd82 TestAWT.java: Fix test program so that it does not show modal dialogs twice and so that it...
* gnu/java/awt/peer/gtk/TestAWT.java: Fix test program so that it does
        not show modal dialogs twice and so that it allows showing a modal
        dialog from another modal dialog.

From-SVN: r75803
2004-01-13 13:09:31 +00:00
Graydon Hoare 55db8fa9e7 JLayeredPane.java: Rewrite to accomodate djee@redhat.com's recent inverse ordering of Container...
2004-01-08  Graydon Hoare  <graydon@redhat.com>

	* javax/swing/JLayeredPane.java: Rewrite to accomodate
	djee@redhat.com's recent inverse ordering of Container elements.

From-SVN: r75745
2004-01-12 19:11:00 +00:00
Michael Koch df9bad8183 2004-01-11 Michael Koch <konqueror@gmx.de>
* gnu/java/lang/reflect/TypeSignature.java
	(getEncodingOfClass): Documentation fixed.
	(getClassForEncoding): Give class loader to Class.forName().
	Documentation fixed.

From-SVN: r75675
2004-01-11 14:07:36 +00:00
Michael Koch 4a8e704126 2004-01-10 Michael Koch <konqueror@gmx.de>
* gnu/java/awt/image/ImageDecoder.java
	(produce): Made public.
	* gnu/java/awt/peer/GLightweightPeer.java,
	gnu/java/awt/peer/gtk/GtkToolkit.java:
	Reformated.

From-SVN: r75653
2004-01-10 21:32:23 +00:00
Michael Koch e6f8299852 2004-01-09 Michael Koch <konqueror@gmx.de>
* gnu/java/lang/ArrayHelper.java
	(equalsArray): Removed.

From-SVN: r75592
2004-01-09 17:18:29 +00:00
Fernando Nasser 06fe3d7df2 GtkFileDialogPeer.java (nativeSetFile): New name for the former setFile native method.
* gnu/java/awt/peer/gtk/GtkFileDialogPeer.java (nativeSetFile):
        New name for the former setFile native method.
        (setFile): New method.
        (setDirectory): Implemented.
        (connectSignals): New native method.
        (setFilenameFilter): Improve comment.
        (getGraphics): Comment.
        (gtkHideFileDialog): New method.
        (gtkDisposeFileDialog): New method.
        (gtkSetFilename): New method.
        * java/awt/Dialog.java (show): Block on modal dialogs, but only
        for FileDialog for now.
        (hide): New method.
        (dispose): New method.
        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c
        (Java_gnu_java_awt_peer_gtk_GtkFileDialog_create): Replace
        deprecated creation functions.  Make dialog modal.  Add it to the
        window group.
        (Java_gnu_java_awt_peer_gtk_GtkFileDialog_connectSignals): New
        function.
        (Java_gnu_java_awt_peer_gtk_GtkFileDialogPeer_gtkFileSelectionSetFilename):
        Rename to...
        (Java_gnu_java_awt_peer_gtk_GtkFileDialogPeer_nativeSetFile): New
        name.
        (window_closed): New function.
        (ok_clicked): New function.
        (cancel_clicked): New function.

From-SVN: r75557
2004-01-08 21:12:25 +00:00
Michael Koch 26067b8be8 2004-01-07 Michael Koch <konqueror@gmx.de>
* gnu/java/nio/DatagramChannelImpl.java
	(blocking): Removed.
	(DatagramChannelImpl): Call configureBlocking().
	(implConfigureBlocking): Dont initialize blocking.
	* gnu/java/nio/ServerSocketChannelImpl.java
	(blocking): Removed.
	(ServerSocketChannelImpl): Call configureBlocking().
	(implConfigureBlocking): Dont initialize blocking.
	* gnu/java/nio/SocketChannelImpl.java
	(blocking): Removed.
	(SocketChannelImpl): Call configureBlocking().
	(implConfigureBlocking): Dont initialize blocking.
	(connect): Use isBlocking().
	* java/nio/channels/spi/AbstractSelectableChannel.java
	(configureBlocking): Use blockingLock() instead of LOCK.
	Set blocking after successfully called implConfigureBlocking().
	(register): Use blockingLock() instead of LOCK.

From-SVN: r75507
2004-01-07 16:51:49 +00:00
Michael Koch a023ec34d1 Connection.java: Reformated copyright.
2004-01-06  Michael Koch  <konqueror@gmx.de>

	* gnu/java/net/protocol/file/Connection.java:
	Reformated copyright.
	(hdrHash): Removed.
	(hdrVec): Removed.
	(gotHeaders): Removed.
	(getHeaderField): Removed.
	(getHeaderField): Removed.
	(getHeaderFieldKey): Removed.
	(getKey): Removed.
	(getField): Removed.
	(getHeaders): Removed.

From-SVN: r75473
2004-01-06 15:00:11 +00:00
Thomas Fitzsimmons a8c2775c37 2004-01-05 Thomas Fitzsimmons <fitzsim@redhat.com>
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c
	(pre_event_handler): Set all insets to 0 when a Configure event
	is received for a GtkPlug.
	* gnu/java/awt/EmbeddedWindow.java (window_id): Rename handle.
	Make handle long, not int.
	(EmbeddedWindow()): New constructor.
	(EmbeddedWindow(int)): Rename window_id to handle.  Make handle
	long, not int.
	(setHandle): New method.
	(getHandle): Return long, not int.
	* gnu/java/awt/peer/EmbeddedWindowPeer.java (embed): New method
	declaration.
	* gnu/java/awt/peer/gtk/GtkEmbeddedWindowPeer.java,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c:
	(create(long)): Take long parameter, not int.  Cast gtk_plug_new
	argument to GdkNativeWindow.
	(construct): New method.
	(embed): New method.

From-SVN: r75447
2004-01-05 21:41:21 +00:00
Thomas Fitzsimmons 6037221c71 2004-01-05 Thomas Fitzsimmons <fitzsim@redhat.com>
* gnu/java/awt/peer/gtk/GtkScrollPanePeer.java,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollPanePeer.c
	(create(int, int)): New method.
	(create): Call new create method.
	(gtkScrolledWindowNew, gtkScrolledWindowSetSize): Remove
	methods.
	(childResized): Remove native implementation.  Implement in
	Java.
	(getHScrollbarHeight, getVScrollbarWidth): Call
	gtk_widget_size_request to get scrollbar dimensions.
	* java/awt/ScrollPane.java (getViewportSize): Reimplement.  Only
	call getVScrollbarWidth and getHScrollbarHeight when vertical
	and horizontal scrollbars respectively are needed.
	(doLayout): Enlarge child if it is smaller than the viewport.

From-SVN: r75446
2004-01-05 21:35:33 +00:00
Fernando Nasser b7a9b4af03 Choice.java (add): Leave posting of ItemEvents to peer.
2004-01-05  Fernando Nasser  <fnasser@redhat.com>

        * java/awt/Choice.java (add): Leave posting of ItemEvents to peer.
        (insert): Ditto.
        (remove): Ditto.  Also, Check for valid argument.
        (removeAll): Use peer interface method.
        * gnu/java/awt/peer/gtk/GtkChoicePeer.java (nativeAdd): New name for
        native add function.
        (nativeRemove): New name for native remove function.
        (getHistory): New native function.
        (constructor): Generate ItemEvent.
        (add): Ditto, if selection is changed.
        (remove): Ditto, ditto.
        (removeAll): Add implementation.
        (handleEvent): Remove.  Dead code.
        (choicePostItemEvent): Add comment.
        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c
        (Java_gnu_java_awt_peer_gtk_GtkChoicePeer_append): Add comments.
        (Java_gnu_java_awt_peer_gtk_GtkChoicePeer_add): Rename to...
        (Java_gnu_java_awt_peer_gtk_GtkChoicePeer_nativeAdd): New name.  Add
        comments and fix condition to change selection.
        (Java_gnu_java_awt_peer_gtk_GtkChoicePeer_remove): Rename to...
        (Java_gnu_java_awt_peer_gtk_GtkChoicePeer_nativeRemove): New name.  Add
        remove all capability.
        (Java_gnu_java_awt_peer_gtk_GtkChoicePeer_getHistory): New function.
        (item_activate): Add cast to remove compiler warning.

From-SVN: r75443
2004-01-05 21:18:06 +00:00
Thomas Fitzsimmons b17fc9eb25 2004-01-05 Thomas Fitzsimmons <fitzsim@redhat.com>
* gnu/java/awt/peer/gtk/GtkComponentPeer.java,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
	(getPreferredSize): Call preferredSize.
	(preferredSize): Call gtkWidgetGetPreferredDimensions.
	(getMinimumSize): Call minimumSize.
	(minimumSize): Call gtkWidgetGetPreferredDimensions.
	(gtkWidgetGetDimensions): Return the peer widget's current size
	request.
	(gtkWidgetGetPreferredDimensions): Return the peer widget's
	natural size request.

From-SVN: r75442
2004-01-05 21:13:46 +00:00
Michael Koch 24ce9c2d97 2003-12-31 Michael Koch <konqueror@gmx.de>
* gnu/java/net/protocol/http/Connection.java
	(sendRequest): Dont encode output in default character encoding,
	add correct version number to HTTP user agent string.

From-SVN: r75266
2003-12-31 11:27:09 +00:00
Graydon Hoare 8fe7789edd configure.in: Add --enable-gtk-cairo check.
2003-12-16  Graydon Hoare  <graydon@redhat.com>

	* configure.in: Add --enable-gtk-cairo check.
	* configure: Regenerate.
	* Makefile.am: Conditionally link against cairo.
	* Makefile.in: Regenerate.
	* acinclude.m4: Include PKG_CHECK_MODULES.
	* aclocal.m4: Regenerate.
	* gnu/java/awt/peer/gtk/GtkToolkit.java (useGraphics2D): New method.
	(getFontMetrics, getClasspathFontPeer):
	* gnu/java/awt/peer/gtk/GtkCanvasPeer.java (getGraphics):
	* gnu/java/awt/peer/gtk/GtkComponentPeer.java (createImage):
	* gnu/java/awt/peer/gtk/GtkContainerPeer.java (getGraphics):
	* gnu/java/awt/peer/gtk/GtkFramePeer.java (getGraphics):
	Switch behavior depending on GtkToolkit.useGraphics2D().
	* gnu/java/awt/peer/gtk/GtkFontPeer.java: Extend ClasspathFontPeer.
	* java/awt/Font.java: Switch to peer model.
	* jni/gtk-peer/gtkcairopeer.h: Definitions of cairo stuff.
	* jni/gtk-peer/gdkfont.h: Include gtkcairopeer.h.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c: Include gtkcairopeer.h.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeerMetrics.c: Un-include gtkpeer.h.

From-SVN: r75260
2003-12-31 08:58:31 +00:00
Michael Koch f04f5b1fad 2003-12-30 Michael Koch <konqueror@gmx.de>
* gnu/java/net/protocol/http/Connection.java
	(outputStream): New field.
	(bufferedOutputStream): New field.
	(connect): Initialize outputStream and bufferedOutputStream.
	(sendRequest): Create PrintWriter object from outputStream,
	support HTTP 1.1, send missing HTTP headers and buffered output data
	for POST method.
	(getOutputStream): Set request method to POST if output stream is
	used, return bufferedOutputStream.
	(setRequestMethod): Allow HEAD and POST methods.
	This fixes libgcj PR/6302 and libgcj PR/7752.

From-SVN: r75233
2003-12-30 13:43:24 +00:00
Michael Koch b976c2fc29 2003-12-30 Michael Koch <konqueror@gmx.de>
* gnu/java/net/protocol/http/Connection.java
	(requestProperties): New field.
	(addRequestProperty): New method.
	(getRequestProperty): New method.
	(setRequestProperty): New method.
	(getRequestProperties): New method.

From-SVN: r75228
2003-12-30 12:02:47 +00:00
Michael Koch 9f88b919e0 2003-12-28 Michael Koch <konqueror@gmx.de>
* gnu/java/net/protocol/http/Connection.java
	(inputStream): Made it a DataInputStream.
	(requestProperties): Removed.
	(hdrHash): Removed.
	(hdrVec): Removed.
	(headers): New field to store headers.
	(connect): Initialize inputStream.
	(receiveReply): Merged from classpath. The new algorithm is line based
	instead of character based.
	(getHeaderField): Use headers.
	(getHeaderFields): Use headers.
	(getKey): Removed.
	(getField): Removed.
	* gnu/java/net/HeaderFieldHelper.java: New file.
	* Makefile.am (ordinary_java_source_files):
	Added gnu/java/net/HeaderFieldHelper.java.
	* Makefile.in: Regenerated.

From-SVN: r75183
2003-12-28 21:30:45 +00:00
Michael Koch bb6d84f38e 2003-12-27 Michael Koch <konqueror@gmx.de>
* gnu/java/net/protocol/http/Connection.java
	(getRequestProperty): Removed.
	(setRequestProperty): Removed.

From-SVN: r75175
2003-12-27 20:49:12 +00:00
Michael Koch 82ebe78b9e 2003-12-27 Michael Koch <konqueror@gmx.de>
* gnu/java/net/protocol/http/Connection.java
	(connect): Call receiveReply().
	(receiveReply): Renamed from getHttpHeaders().
	(getOutputStream): Moved check on doOutput before check for connection
	state.

From-SVN: r75172
2003-12-27 17:24:51 +00:00
Guilhem Lavaux 38910ebb1b 2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
Mark Wielaard  <mark@klomp.org>

	* gnu/java/rmi/server/UnicastConnectionManager.java
	(startScavenger): Set the client connection manager to daemon
	state because it may block clients until TIMEOUT is reached
	when they are exiting.

	* gnu/java/rmi/RMIVoidValue.java: New file for a class representing
	a void return.

	* gnu/java/rmi/server/UnicastRemoteCall.java
	(DummyOutputStream): Add a boolean before each written field to
	know whether it is a primitive.
	(releaseOutputStream): Flush parameters at write time.

	* gnu/java/rmi/server/UnicastServerRef.java
	(incomingMessageCall): Return a RMIVoidValue if no value is to be
	returned.

	* gnu/java/rmi/server/UnicastServer.java
	(incomingMessageCall): Do not write a returned object if it is
	a RMIVoidValue.

Co-Authored-By: Mark Wielaard <mark@klomp.org>

From-SVN: r75033
2003-12-26 16:13:01 +00:00
Fernando Nasser baba70d019 GtkChoicePeer.java (postItemEvent): Rename to...
2003-12-22  Fernando Nasser  <fnasser@redhat.com>

        * gnu/java/awt/peer/gtk/GtkChoicePeer.java (postItemEvent): Rename to...        (choicePostItemEvent): Change signature to more specific String object.
        * java/awt/Choice.java (add): Generate ItemEvent for the first item
        added.
        (insert): Generate ItemEvent if insertion caused
        selection to change.
        (remove): Generate ItemEvent if removal cause selection to change.
        (removeAll): Change algorithm to prevent generation of ItemEvents.
        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c
        (connect_choice_item_selectable_hook): Change argument type.
        Fix argument value.
        Make sure resources are feed by registering callback.
        (Java_gnu_java_awt_peer_gtk_GtkChoicePeer_append): Adjust call to the
        above function.
        (Java_gnu_java_awt_peer_gtk_GtkChoicePeer_add): Ditto.
        (item_activate): Ditto.
        (Java_gnu_java_awt_peer_gtk_GtkChoicePeer_remove): Destroy removed
        menuitem.
        (item_removed): New function.  Free resources.
        * jni/gtk-peer/gtkpeer.h (item_event_hook_info): Change member type and
        name.
        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c
        (Java_gnu_java_awt_peer_gtk_GtkMainThread_gtkInit): Obtain MethodID for
        choicePostItemEvent.

From-SVN: r74979
2003-12-23 19:24:00 +00:00
Michael Koch 59bed4cab5 2003-12-21 Michael Koch <konqueror@gmx.de>
* gnu/java/net/PlainDatagramSocketImpl.java
	(mcastGrp): Added documentation.

From-SVN: r74896
2003-12-20 23:04:44 +00:00
Michael Koch 4e24f93733 2003-12-20 Michael Koch <konqueror@gmx.de>
* gnu/java/net/protocol/jar/Connection.java
	(connectionCache): New field.
	(connect): New method.
	(getInputStream): New method.
	(hdrHash): New field.
	(hdrVec): New field.
	(gotHeaders): New field.
	(getHeaderField): New method.
	(getHeaderFields): New method.
	(getHeaderFieldKey): New method.
	(getKey): New method.
	(getField): New method.
	(getHeaders): New method.
	* java/net/JarURLConnection.java
	(connectionCache): Removed.
	(connect): Removed.
	(getInputStream): Removed.
	(hdrHash): Removed.
	(hdrVec): Removed.
	(gotHeaders): Removed.
	(getHeaderField): Removed.
	(getHeaderFields): Removed.
	(getHeaderFieldKey): Removed.
	(getKey): Removed.
	(getField): Removed.
	(getHeaders): Removed.

From-SVN: r74895
2003-12-20 22:54:26 +00:00
Mohan Embar 677f99cce5 * gnu/java/nio/SelectorImpl.java
(selectThreadMutex): New field.
	(selectThread): New field.
	(unhandledWakeup): New field.
	(implCloseSelector): Added skeleton code which
	synchronizes as per Sun JRE JavaDoc.
	(keys): Throw ClosedSelectorException if selector
	is closed.
	(selectNow): Added comment that we're faking out
	an immediate select with a one-microsecond-timeout one.
	(select): Use 0 instead of -1 for infinite timeout.
	(implSelect): Changed comment in declaration.
	(select): Added synchronized to method declaration.
	Added synchronization and wakeup support as per Sun
	JRE JavaDoc.
	(selectedKeys): Throw ClosedSelectorException if selector
	is closed.
	(wakeup): Implemented.
	(deregisterCancelledKeys): Synchronize on cancelled key
	set before deregistering.
	(register): Synchronize on key set before registering.
	* java/nio/channels/spi/AbstractSelector.java
	Added import for java.nio.channels.ClosedSelectorException.
	(close): Added synchronized to method declaration.
	(cancelledKeys): Throw ClosedSelectorException if selector
	is closed.
	(cancelKey): Synchronize on cancelled key set before key.

From-SVN: r74879
2003-12-20 15:33:24 +00:00
Guilhem Lavaux 32ab41edd2 URLParseError.java: New file.
2003-12-20  Guilhem Lavaux <guilhem@kaffe.org>

	* gnu/java/net/URLParseError.java: New file.
	* gnu/java/net/protocol/jar/Handler.java
	(parseURL): Throw URLParseError if needed, fix '/' handling.
	* java/net/URL.java (URL): Catch URLParseError and
	transform it into a MalformedURLException.

From-SVN: r74877
2003-12-20 12:28:25 +00:00
Michael Koch 01da266767 ChannelOutputStream.java: New file.
2003-12-19  Michael Koch  <konqueror@gmx.de>

	* gnu/java/nio/ChannelOutputStream.java: New file.
	* java/nio/channels/Channels.java
	(newOutputStream): Implemented.
	* Makefile.am (ordinary_java_source_files)
	Added gnu/java/nio/ChannelOutputStream.java.
	* Makefile.in: Regenerated.

From-SVN: r74847
2003-12-19 20:42:00 +00:00
Michael Koch 26392535a7 ChannelInputStream.java: New file.
2003-12-19  Michael Koch  <konqueror@gmx.de>

	* gnu/java/nio/ChannelInputStream.java: New file.
	* java/nio/channels/Channels.java (newInputStream): Implemented.
	* java/nio/channels/FileChannelImpl.java
	(readImpl): Only put data into buffer if something was read.
	* Makefile.am (ordinary_java_source_files):
	Added gnu/java/nio/ChannelInputStream.java.
	* Makefile.in: Regenerated.

From-SVN: r74842
2003-12-19 19:06:34 +00:00
Michael Koch 9175d628d0 OutputStreamChannel.java: New file.
2003-12-19  Michael Koch  <konqueror@gmx.de>

	* gnu/java/nio/OutputStreamChannel.java: New file.
	* java/nio/channels/Channels.java (newChannel): Implemented.
	* Makefile.am (ordinary_java_source_files):
	Added gnu/java/nio/OutputStreamChannel.java.
	* Makefile.in: Regenerated.

From-SVN: r74840
2003-12-19 16:31:59 +00:00
Michael Koch b8362a2315 InputStreamChannel.java: New file.
2003-12-19  Michael Koch  <konqueror@gmx.de>

	* gnu/java/nio/InputStreamChannel.java: New file.
	* java/nio/channels/Channels.java (newChannel): Implemented.

From-SVN: r74838
2003-12-19 15:22:33 +00:00
Michael Koch 177dcc4bad 2003-12-19 Michael Koch <konqueror@gmx.de>
* gnu/java/net/protocol/jar/Handler.java
	(parseURL): New method.
	(toExternalForm): New method.

From-SVN: r74827
2003-12-19 09:48:28 +00:00
Fernando Nasser f84241ba7d GtkListPeer.java (handleEvent): Fix generation of ActionEvents for mouse double-clicks.
2003-12-17  Fernando Nasser  <fnasser@redhat.com>

        * gnu/java/awt/peer/gtk/GtkListPeer.java (handleEvent): Fix generation
        of ActionEvents for mouse double-clicks.

From-SVN: r74745
2003-12-17 18:02:56 +00:00
Fernando Nasser 310b075bd8 GtkContainerPeer.java (handleEvent): Check for null Graphics pointer returned by FileDialogPeer.
2003-12-16  Fernando Nasser  <fnasser@redhat.com>

        * gnu/java/awt/peer/gtk/GtkContainerPeer.java (handleEvent): Check for
        null Graphics pointer returned by FileDialogPeer.

From-SVN: r74744
2003-12-17 17:20:00 +00:00
Mohan Embar 89c5711036 natPlainDatagramSocketImplWin32.cc: Removed unused InterruptedIOException.h include.
* gnu/java/net/natPlainDatagramSocketImplWin32.cc:
	Removed unused InterruptedIOException.h include.
	* gnu/java/net/natPlainSocketImplWin32.cc
	(connect): Reset and ignore our thread's interrupted
	flag instead of testing and throwing an InterruptedIOException
	if set.
	(accept): Likewise + changed case of SocketTimeoutException
	text.
	(write): Likewise (for both overloads).
	(doRead): Likewise.

From-SVN: r74716
2003-12-16 22:57:06 +00:00
Mohan Embar 5cd4d463f9 win32.cc (WSAEventWrapper): Implemented default constructor and init() methods.
* win32.cc (WSAEventWrapper): Implemented default
	constructor and init() methods.
	(_Jv_select): Removed.
	* gnu/java/nio/natSelectorImplWin32.cc
	(helper_put_filedescriptors): Removed.
	(helper_get_filedescriptors): Removed.
	(implSelect): Implemented in terms of WSAEventWrapper
	and WSAWaitForMultipleEvents instead of _Jv_select().
	Added support for thread interruption.
	* include/win32.h (WSAEventWrapper): Minor formatting
	changes; added default constructor declaration, init(),
	getFD() and getEventHandle() methods.
	(_Jv_select): Removed.

From-SVN: r74715
2003-12-16 22:54:22 +00:00
Mohan Embar 027e655b6e * gnu/java/net/natPlainDatagramSocketImplPosix.cc
(peekData): Throw SocketTimeoutException instead of
	InterruptedIOException on timeout.
	(receive): Likewise.
	* gnu/java/net/natPlainSocketImplPosix.cc
	(read): Made a minor exception text case change.

From-SVN: r74714
2003-12-16 22:47:53 +00:00
Guilhem Lavaux 5ecc3a7676 TypeSignature.java (getClassForEncoding): Splitted the method so we can specify an explicit boot loader.
2003-12-16 Guilhem Lavaux <guilhem@kaffe.org>
           Helmer Kraemer <hkraemer@freenet.de>

	* gnu/java/lang/reflect/TypeSignature.java (getClassForEncoding):
	Splitted the method so we can specify an explicit boot loader.

Co-Authored-By: Helmer Kraemer <hkraemer@freenet.de>

From-SVN: r74687
2003-12-16 11:35:40 +00:00
Mohan Embar c1fb3625ae * gnu/java/nio/SocketChannelImpl.java
(write): Removed diagnostic trace.
	* gnu/java/nio/natSelectorImplPosix.cc: Added
	includes for java.lang.Thread and java.io.InterruptedIOException.
	(helper_put_filedescriptors): Don't put invalid file descriptors
	in select set.
	(helper_get_filedescriptors): Clear invalid file descriptors
	from select set.
	(helper_reset): New method for clearing our file descriptor
	array.
	(implSelect): Correctly calculate timeout if specified and
	legal.
	Intercept and deal with any java.io.InterruptedIOException
	thrown by _Jv_select().

From-SVN: r74537
2003-12-11 15:35:13 +00:00
Fernando Nasser 834b120907 gnu_java_awt_peer_gtk_GtkEvents.c (awt_event_handler): Most coded moved to pre_event_handler, with the modifications mentioned below.
2003-12-08  Fernando Nasser  <fnasser@redhat.com>

        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c (awt_event_handler):
        Most coded moved to pre_event_handler, with the modifications
        mentioned below.
        (pre_event_handler): New function.  Called on the Gtk "event" signal.
        Do not retrieve the jobject from the window property as it is already
        available as user data in the signal.
        Do not try and find the grab widget as it is already done by Gtk at
        this point.
        Do not search for Window ancestor as Gtk already sends the signal to it.        Do not meddle with the activation state of peer widgets on each
        key press or release.
        Add CList to the special handling when looking for the focused widget.
        * jni/gtk-peer/gtkpeer.h: Add declaration for pre_event_handler.
        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c (connectJObject):
        New function.
        (connectSignals): New function.
        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c (connectHooks):
        Rename to...
        (connectSignals): New name.  Get rid of NewGlobalRef call.
        Use g_signal_connect instead of deprecated gtk_signal_connect.
        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c
        (connect_choice_item_selectable_hook): Use g_signal_connect instead of
        deprecated gtk_signal_connect.
        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c
        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuItemPeer.c
        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c
        (Java_gnu_java_awt_peer_gtk_GtkClipboard_initNativeState): Ditto.
        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
        (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectHooks): Remove
        function.
        (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectJObject): New
        function.
        (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectSignals): New
        function.
        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c
        (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectHooks): Remove
        function.
        (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectJObject): New
        function.
        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c
        (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectHooks): Remove
        function.
        (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectJObject): New
        function.
        (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectSignals): New
        function.
        (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_old_create): Remove dead
        code.
        (item_select): Remove indirection.
        (item_unselect): Ditto.
        (connect_selectable_hook): Folded into connectSignals.
        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPanelPeer.c
        (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectHooks): Remove
        function.
        (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectJObject): New
        function.
        (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectSignals): New
        function.
        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c: Ditto.
        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c
        (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectHooks): Remove
        function.
        (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectSignals): New
        function.
        * gnu/java/awt/peer/gtk/GtkComponentPeer.java: Declare  and call
        connectJObject and connectSignals instead of connectHooks.
        * gnu/java/awt/peer/gtk/GtkButtonPeer.java: Declare connectJObject and
        connectSignals.
        * gnu/java/awt/peer/gtk/GtkCheckboxPeer.java: Declare connectSignals
        and not connectHooks.
        * gnu/java/awt/peer/gtk/GtkTextComponentPeer.java: Ditto.
        * gnu/java/awt/peer/gtk/GtkFileDialogPeer.java: Declare connectJObject
        and not connectHooks.
        * gnu/java/awt/peer/gtk/GtkListPeer.java: Declare connectJObject and
        connectSignals instead of connectHooks.
        * gnu/java/awt/peer/gtk/GtkPanelPeer.java: Ditto.
        * gnu/java/awt/peer/gtk/GtkScrollbarPeer.java: Ditto.
        * gnu/java/awt/peer/gtk/GtkWindowPeer.java: Ditto.

From-SVN: r74536
2003-12-11 13:50:51 +00:00
Michael Koch 25a23f3b26 2003-12-09 Michael Koch <konqueror@gmx.de>
* gnu/java/nio/SelectorImpl.java
	(implSelect): Throws IOException.
	(select): Likewise.

From-SVN: r74468
2003-12-09 15:34:07 +00:00
Kim Ho bc67c73d4a Fix for Checkbox states.
2003-12-08  Kim Ho  <kho@redhat.com>

	Fix for Checkbox states.
	* gnu/java/awt/peer/gtk/GtkCheckboxPeer.java:
	(currentState): New field.
	(nativeCreate): Add initial state parameter.
	(create): Changed to reflect new parameter.
	(setState): Fire only on changed states.
	(postItemEvent): Fire only on changed states. Also change the
	Java Checkbox to reflect new state.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c:
	(nativeCreate): Add parameter and set active state.

From-SVN: r74459
2003-12-09 03:47:32 +00:00
Scott Gilbertson b3e4bb0347 GC.java (updateClip): Added rectangles argument.
2003-12-05  Scott Gilbertson  <scottg@mantatest.com>

	* gnu/gcj/xlib/GC.java (updateClip): Added rectangles argument.
	(clip): Removed field
	(clipRectangles): New field.
	(clone): Use new updateClip.
	(setClipRectangles): Use new updateClip.
	* gnu/gcj/xlib/natGC.cc (updateClip): Prepare passed rectangles.

From-SVN: r74348
2003-12-05 22:10:16 +00:00
Michael Koch 89231ff027 2003-12-04 Michael Koch <konqueror@gmx.de>
* gnu/java/net/protocol/http/Connection.java
	(sendRequest): Merged writing http headers with classpath.
	(getInputStream): Merged documentation from classpath.
	(getHeaderField): Likewise.
	(getHeaderFieldKey): Likewise.

From-SVN: r74283
2003-12-04 17:52:01 +00:00
Michael Koch 477913522a 2003-12-04 Michael Koch <konqueror@gmx.de>
* java/net/DatagramPacket.java
	(length): Made packge-private to make it accessible via CNI.
	(maxlen): New field.
	(DatagramPacket): Cleaned up.
	(setSocketAddress): Add message to exception.
	(setData): Call other setData().
	(setData): Call setLength().
	(setLength): Initialize maxlen too.
	* gnu/java/net/natPlainDatagramSocketImplPosix.cc (peekData):
	Get maximal length from maxlen field, set length field directly.
	(receive): Likewise.
	* gnu/java/net/natPlainDatagramSocketImplWin32.cc (peekData):
	Get maximal length from maxlen field, set length field directly.
	(receive): Likewise.

From-SVN: r74278
2003-12-04 10:59:56 +00:00
Mohan Embar 148c8e7b51 * gnu/java/nio/natSelectorImplPosix.cc
(implSelect): A timeout of 0 means an infinite
	timeout.

From-SVN: r74259
2003-12-04 00:31:27 +00:00
Fernando Nasser 26d86d940e GtkListPeer.java (handleEvent): Fix generation of ActionEvents.
2003-12-02  Fernando Nasser  <fnasser@redhat.com>

        * gnu/java/awt/peer/gtk/GtkListPeer.java (handleEvent): Fix generation
        of ActionEvents.

From-SVN: r74248
2003-12-03 22:29:31 +00:00
Thomas Fitzsimmons 49246a5229 GdkPixbufDecoder.java: Make BufferedImageBuilder class static.
2003-12-02  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* gnu/java/awt/peer/gtk/GdkPixbufDecoder.java: Make
	BufferedImageBuilder class static.

From-SVN: r74195
2003-12-02 19:56:30 +00:00
Fernando Nasser a104538631 GtkListPeer.java (handleEvent): New method.
2003-12-02  Fernando Nasser  <fnasser@redhat.com>

        * gnu/java/awt/peer/gtk/GtkListPeer.java (handleEvent): New
        method. Handle mouse and key events that must generate
        ActionEvents.
        * java/awt/List.java (getSelectedIndex): Return -1
        if no list element is selected.
        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c (awt_event_handler):
        Correct handling of mouse and key events so that List receives them.
        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c
        (Java_gnu_java_awt_peer_gtk_GtkListPeer_delItems): Fix removal of
        multiple list elements.

From-SVN: r74189
2003-12-02 16:19:28 +00:00
Michael Koch 598e749df6 2003-12-02 Michael Koch <konqueror@gmx.de>
* gnu/java/nio/DatagramChannelImpl.java
	(blocking): Initialize with true by default.
	* gnu/java/nio/ServerSocketChannelImpl.java
	(serverSocket): Made private.
	(blocking): Likewise.
	(connected): Likewise.
	* gnu/java/nio/SocketChannelImpl.java
	(connectionPending): Made private.
	* gnu/java/nio/FileLockImpl.java
	(static): Load native library (needed for classpath).
	* gnu/java/nio/SelectorImpl.java
	(static): Load native library (needed for classpath).

From-SVN: r74181
2003-12-02 15:03:21 +00:00
Michael Koch a74e3b7707 2003-12-02 Michael Koch <konqueror@gmx.de>
* gnu/java/net/protocol/file/Connection.java
	(getLastModified): Implement for file connections.
	(getContentLength): Likewise.

From-SVN: r74180
2003-12-02 14:36:22 +00:00
Michael Koch 84ebbc6777 Connection.java: Some reformating.
2003-12-02  Michael Koch  <konqueror@gmx.de>

	* gnu/java/net/protocol/file/Connection.java:
	Some reformating.
	(file): Renamed from fileIn.
	(getPermission): Moved around.

From-SVN: r74179
2003-12-02 14:27:33 +00:00
Michael Koch 83f85f9c8d 2003-12-02 Michael Koch <konqueror@gmx.de>
* gnu/java/net/protocol/jar/Connection.java
	(Connection): Made class final, merged documentation with classpath.
	(file_cache): Made private.
	(jar_file): Renamed from jarfile.

From-SVN: r74178
2003-12-02 14:19:34 +00:00
Michael Koch 91305a1de9 2003-12-02 Michael Koch <konqueror@gmx.de>
* gnu/java/net/protocol/http/Connection.java
	(Connection): Initialize doOutput to false;
	(connect): Initialize inputStream, moved "send request" code to new
	method.
	(sendRequest): New method.
	(getHttpHeaders): Don't reinitialize inputStream.

From-SVN: r74177
2003-12-02 14:13:46 +00:00
Michael Koch 2b95402c94 2003-12-02 Michael Koch <konqueror@gmx.de>
* gnu/java/net/protocol//http/Connection.java
	(defRequestProperties): Removed. This dont gets used since JDK 1.3.
	(requestProperties): Initialize, documentation added.
	(inputStream): Renamed from bufferedIn.
	(Connection): Dont initialize requestProperties.
	(setDefaultRequestProperty): Removed.
	(getDefaultRequestProperty): Removed.
	(usingProxy): Documentation added.
	(getHttpHeaders): Likewise.

From-SVN: r74176
2003-12-02 13:44:23 +00:00
Thomas Fitzsimmons bebae71041 GdkFontMetrics.java (GdkFontMetrics): Pass font name, not XLFD, to initState.
2003-12-01  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* gnu/java/awt/peer/gtk/GdkFontMetrics.java (GdkFontMetrics):
	Pass font name, not XLFD, to initState.
	(stringWidth(String, int, String)): New method.
	(stringWidth(String)): Call new stringWidth.
	(getLeading): Always return 0.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontMetrics.c
	(initState): New Pango implementation.
	(stringWidth): Likewise.

From-SVN: r74133
2003-12-01 23:12:09 +00:00
Thomas Fitzsimmons aa66a642c1 GtkButtonPeer.java, [...]: Remove files.
2003-12-01  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* gnu/awt/gtk/GtkButtonPeer.java, gnu/awt/gtk/gtkcommon.cc,
	gnu/awt/gtk/gtkcommon.h, gnu/awt/gtk/GtkComponentPeer.java,
	gnu/awt/gtk/GtkContainerPeer.java,
	gnu/awt/gtk/GtkFramePeer.java, gnu/awt/gtk/GtkLabelPeer.java,
	gnu/awt/gtk/GtkMainThread.java, gnu/awt/gtk/GtkToolkit.java,
	gnu/awt/gtk/GtkWindowPeer.java, gnu/awt/gtk/natGtkButtonPeer.cc,
	gnu/awt/gtk/natGtkComponentPeer.cc,
	gnu/awt/gtk/natGtkContainerPeer.cc,
	gnu/awt/gtk/natGtkFramePeer.cc, gnu/awt/gtk/natGtkLabelPeer.cc,
	gnu/awt/gtk/natGtkMainThread.cc, gnu/awt/gtk/natGtkToolkit.cc,
	gnu/awt/gtk/natGtkWindowPeer.cc: Remove files.

From-SVN: r74118
2003-12-01 18:40:39 +00:00
Michael Koch 8325a4ec9c 2003-12-01 Michael Koch <konqueror@gmx.de>
* gnu/java/net/protocol/http/Connection.java
	(Connection): Merged class documentation.
	(socket): Renamed from sock.
	(Connection): Made protected, documentation added.
	(connect): Give URL'S host instead of InetAddress to Socket
	constructor.
	(disconnect): Documentation added.
	(getOutputStream): Rewrapped.

From-SVN: r74109
2003-12-01 16:35:45 +00:00
Michael Koch 1fa7e0fd52 2003-12-01 Michael Koch <konqueror@gmx.de>
* gnu/java/net/protocol/file/Connection.java
	(fileIn): Documentation added.
	(inputStream): Likewise.
	(outputStream): Likewise.
	(Connection): Likewise.
	(connect): Simplified.

From-SVN: r74106
2003-12-01 15:50:23 +00:00
Thomas Fitzsimmons ec22cdf140 GtkImage.java (setDimensions, [...]): Check that io is not null before calling io.imageUpdate.
2003-12-01  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* gnu/java/awt/peer/gtk/GtkImage.java (setDimensions,
	setProperties): Check that io is not null before calling
	io.imageUpdate.
	* java/awt/image/ImageConsumer.java (setPixels, imageComplete):
	Update javadocs.
	* java/awt/image/PixelGrabber.java: Fix implementation and
	update javadocs.

From-SVN: r74103
2003-12-01 15:28:22 +00:00
Michael Koch a1ff4c6478 natPlainSocketImplPosix.cc bind (): Dont set SockedImpl.address field on succesful bind.
2003-12-01  Michael Koch  <konqueror@gmx.de>

	* gnu/java/net/natPlainSocketImplPosix.cc
	bind(): Dont set SockedImpl.address field on succesful bind.
	* gnu/java/net/natPlainSocketImplWin32.cc
	bind(): Likewise.

From-SVN: r74102
2003-12-01 14:32:26 +00:00
Michael Koch 6cf0ea4b86 2003-11-26 Michael Koch <konqueror@gmx.de>
* gnu/java/net/protocol/file/Handler.java
	(Handler): New explicit constructor.
	(openConnection): Added documentation.
	* gnu/java/net/protocol/jar/Handler.java
	(Handler): New explicit constructor.
	(openConnection): Added documentation.

From-SVN: r73945
2003-11-26 10:17:51 +00:00
Michael Koch 539edbe025 * gnu/java/net/natPlainDatagramSocketImplWin32.cc
(peekData): Use offset and maximal free space in datagram packet.
	(receive): Likewise.
	(send): Use offset in datagram packet.

From-SVN: r73848
2003-11-23 01:38:31 +00:00
Michael Koch 343c49ce75 2003-11-22 Michael Koch <konqueror@gmx.de>
* gnu/java/net/natPlainDatagramSocketImplPosix.cc
	(peekData): Use offset and maximal free space in datagram packet.
	(receive): Likewise.
	(send): Use offset in datagram packet.

From-SVN: r73843
2003-11-22 16:49:47 +00:00
Michael Koch d3f010ec28 2003-11-22 Michael Koch <konqueror@gmx.de>
* gnu/java/nio/DatagramChannelImpl.java
	(getNativeFD): Use getPlainDatagramSocketImpl().
	* gnu/java/nio/NIODatagramSocket.java
	(getPlainDatagramSocketImpl): Renamed from getImpl().
	* gnu/java/nio/NIOSocket.java
	(getPlainSocketImpl): Renamed from getImpl().
	(setChannel): Use getPlainSocketImpl().
	* gnu/java/nio/SocketChannelImpl.java
	(SocketChannelImpl): Use getPlainSocketImpl().
	(getPlainSocketImpl): Renamed from getImpl().
	(getNativeFD): Use getPlainSocketImpl().

From-SVN: r73840
2003-11-22 15:13:01 +00:00
Graydon Hoare 146a1ecb87 GdkClasspathFontPeerMetrics.java: New file.
2003-11-17  Graydon Hoare  <graydon@redhat.com>

	* gnu/java/awt/peer/gtk/GdkClasspathFontPeerMetrics.java: New file.
	* gnu/java/awt/peer/gtk/GdkClasspathFontPeer.java
	(GdkFontLineMetrics): New inner class.
	(getLineMetrics): Return new GdkFontLineMetrics.
	(getFontMetrics): Return new GdkClasspathFontPeerMetrics.
	(layoutGlyphVector): Create GdkGlyphVector.
	* gnu/java/awt/peer/gtk/GdkGraphics2D.java (stateStack): New member.
	(GdkGraphics2D): Initialize state via mathod calls.
	(cairoSetMatrix, cairoShowGlyphs): Simplify native calls.
	(cairoTranslate, cairoScale, cairoRotate): Remove.
	(various methods): use setTransform for special transform cases.
	(DrawState): New inner class.
	(stateSave): New method.
	(stateRestore): New method.
	(various methods): use stateSave, stateRestore.
	(getClipInDevSpace): New method.
	(clip, clipRect, setClip, getClip, getClipBounds):
	Follow spec more closely.
	(getTransform): Return clone of transform.
	(setStroke): Set linewidth to passed width / 2.0.
	(setPaintMode): Set SrcOver rather than Xor.
	(setColor): Set paint to passed color.
	(drawRaster, drawImage, PainterThread, drawPixels): Take affine
	transform from image to user space.
	(drawRenderedImage, drawRenderableImage): Implement.
	(getFontRenderContext, getFontMetrics, drawString, getFont):
	Implement
	(drawArc, drawOval, drawRoundRect, fillArc, fillOval, fillRoundRect):
	Implement.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c:
	Match changes to java side.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeer.c:
	Release resources.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGlyphVector.c:
	Don't use pango for metrics.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeerMetrics.c:
	New file.

From-SVN: r73776
2003-11-20 22:44:01 +00:00
Tom Tromey b86ca9a2dc jni.cc (_Jv_JNI_GetStringUTFChars): Pass length of string to JvGetStringUTFRegion.
* jni.cc (_Jv_JNI_GetStringUTFChars): Pass length of string to
	JvGetStringUTFRegion.
	* java/lang/natPosixProcess.cc (new_string): Pass length of string
	to JvGetStringUTFRegion.
	* java/lang/natDouble.cc (parseDouble): Pass length of string to
	JvGetStringUTFRegion.
	* java/lang/natWin32Process.cc (startProcess): Pass length of
	string to JvGetStringUTFRegion.
	* java/lang/natClass.cc (forName): Pass length of string to
	JvGetStringUTFRegion.
	* gnu/gcj/runtime/natNameFinder.cc (getExternalLabel): Pass length
	of string to JvGetStringUTFRegion.
	* gnu/gcj/convert/natIconv.cc (init): Pass length of string to
	JvGetStringUTFRegion.
	* gnu/awt/gtk/natGtkLabelPeer.cc (setText): Pass length of string
	to JvGetStringUTFRegion.
	* gnu/awt/gtk/natGtkButtonPeer.cc (setLabel): Pass length of
	string to JvGetStringUTFRegion.

From-SVN: r73571
2003-11-14 01:48:30 +00:00
Mohan Embar 650dc9b332 * gnu/java/nio/natSelectorImplPosix.cc
(helper_put_filedescriptors): Change to static linkage.
	(helper_get_filedescriptors): Likewise.

From-SVN: r73545
2003-11-13 10:09:40 +00:00
Tom Fitzsimmons 2860518a07 GtkComponentPeer.java (prepareImage): Remove null check.
2003-11-12  Tom Fitzsimmons  <fitzsim@redhat.com>

	* gnu/java/awt/peer/gtk/GtkComponentPeer.java (prepareImage): Remove
	null check.
	* gnu/java/awt/peer/gtk/GtkToolkit.java (prepareImage): Likewise.
	* java/awt/Component.java (prepareImage): Likewise.

From-SVN: r73513
2003-11-12 22:03:49 +00:00
Thomas Fitzsimmons a5966c9ef9 Makefile.am: Add GdkPixbufDecoder.java and gnu_java_awt_peer_gtk_GdkPixbufDecoder.c
2003-11-11  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* Makefile.am: Add GdkPixbufDecoder.java and
	gnu_java_awt_peer_gtk_GdkPixbufDecoder.c
	* Makefile.in: Regenerate.
	* gnu/java/awt/image/ImageDecoder.java (ImageDecoder(byte[],int,int)):
	New constructor.
	(startProduction): Create ByteArrayInputStream when url and filename are
	null.
	(produce): Declare stream parameter as InputStream.
	* gnu/java/awt/image/XBMDecoder.java (produce): Declare stream parameter
	as InputStream.
	* gnu/java/awt/peer/gtk/GdkPixbufDecoder.java
	(GdkPixbufDecoder(byte[],int,int)): New constructor.
	(produce): Declare stream parameter as InputStream.
	* gnu/java/awt/peer/gtk/GtkComponentPeer.java (prepareImage): Throw NPE
	if image is null.  Set image's observer before running PrepareImage
	thread.  Pass image to startProduction.
	* gnu/java/awt/peer/gtk/GtkImage.java: Add null checks before calls to
	source's member functions.
	(observer): New field.
	(setObserver): New method.
	(setDimensions, setPixels, imageComplete): Call observer's imageUpdate.
	* gnu/java/awt/peer/gtk/GtkToolkit.java (checkImage, getImage): Return
	new GtkImage.
	(prepareImage): Implement.
	* java/awt/Component.java: Add static fields incrementalDraw and
	redrawRate.
	(imageUpdate): Implement.
	(createImage): Call Toolkit's createImage if peer is null.
	(prepareImage): Throw NPE if image is null.
	* java/awt/MediaTracker.java: Fix return value.

From-SVN: r73476
2003-11-12 00:37:34 +00:00
Thomas Fitzsimmons 009ed5cc5c GtkLabelPeer.java (create()): Call new create.
2003-11-11  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* gnu/java/awt/peer/gtk/GtkLabelPeer.java (create()): Call new create.
	(create(String, float)): New method.
	(setText): Make native.
	(nativeSetAlignment): New method.
	(setAlignment): Call nativeSetAlignment.
	(getArgs): Remove method.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
	(find_fg_color_widget, find_bg_color_widget): New functions.
	(gtkWidgetSetForeground): Call find_fg_color_widget.
	(gtkWidgetSetBackground): Call find_bg_color_widget.  Modify active and
	prelight colors.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c (create): Wrap label
	widget in event box.
	(setText, setAlignment): Implement new native methods.

From-SVN: r73453
2003-11-11 17:04:47 +00:00
Michael Koch 4ba6d1c3e2 natPipeImpl.cc, [...]: Removed
2003-11-11  Michael Koch  <konqueror@gmx.de>

	* gnu/java/nio/natPipeImpl.cc,
	gnu/java/nio/natSelectorImpl.cc: Removed
	* gnu/java/nio/natPipeImplEcos.cc,
	gnu/java/nio/natPipeImplPosix.cc,
	gnu/java/nio/natPipeImplWin32.cc,
	gnu/java/nio/natSelectorImplEcos.cc,
	gnu/java/nio/natSelectorImplPosix.cc,
	gnu/java/nio/natSelectorImplWin32.cc: New files
	* configure.in: Create links for gnu/java/nio/natPipeImpl.cc and
	gnu/java/nio/natSelectorImpl.cc
	* configure: Regenerated.

From-SVN: r73446
2003-11-11 11:49:12 +00:00
Jeff Sturm edf6d50b51 FirstThread.java (Klocale, Kcalendar): New fields.
* gnu/gcj/runtime/FirstThread.java (Klocale, Kcalendar):
New fields.

From-SVN: r73360
2003-11-08 13:43:12 +00:00
Bryce McKinlay 9b574a7758 * gnu/gcj/xlib/XAnyEvent.java (XAnyEvent): Make constructor public.
From-SVN: r73351
2003-11-08 01:23:47 +00:00
Mohan Embar bbf76ec06c win32.h (_Jv_platform_close_on_exec): Changed signature and declared extern.
* include/win32.h (_Jv_platform_close_on_exec): Changed
	signature and declared extern.
	* win32.cc (_Jv_platform_close_on_exec): Implemented.
	* gnu/java/net/natPlainDatagramSocketImplWin32.cc
	(create): Use new signature of _Jv_platform_close_on_exec.
	* gnu/java/net/natPlainSocketImplWin32.cc
	(create): Eliminated a few typecasts
	Use new signature of _Jv_platform_close_on_exec.
	(accept): Eliminated a few typecasts
	Use new signature of _Jv_platform_close_on_exec.
	* java/io/natFileDescriptorWin32.cc (open): Use
	_Jv_platform_close_on_exec.

From-SVN: r73325
2003-11-07 03:13:56 +00:00
Mohan Embar 76506a3ee3 re PR libgcj/11521 ([win32] can install server socket on same port twice)
PR libgcj/11521:
	* gnu/java/net/natPlainSocketImplWin32.cc
	(bind): Don't use SO_REUSEADDR

From-SVN: r73116
2003-10-31 03:19:51 +00:00
Dalibor Topic 2035efe7fb IntrospectionIncubator.java (addMethod): Add public static methods.
2003-10-29  Dalibor Topic  <robilad@kaffe.org>

	* gnu/java/beans/IntrospectionIncubator.java (addMethod): Add public
	static methods.

From-SVN: r73043
2003-10-29 15:22:01 +00:00
Michael Koch 1d749ee003 2003-10-29 Michael Koch <konqueror@gmx.de>
* gnu/java/net/natPlainDatagramSocketImplPosix.cc
	(setOption): Directly return if no error occured.
	* gnu/java/net/natPlainSocketImplPosix.cc
	(setOption): Likewise.

From-SVN: r73033
2003-10-29 10:33:57 +00:00
Graydon Hoare c4bcf1418f ClasspathToolkit.java: New abstract class.
2003-10-14  Graydon Hoare  <graydon@redhat.com>

	* gnu/java/awt/ClasspathToolkit.java: New abstract class.
	* gnu/java/awt/peer/ClasspathFontPeer.java: New abstract class.
	* gnu/java/awt/peer/gtk/GdkClasspathFontPeer.java,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeer.c:
	New concrete implementation of ClasspathFontPeer, with native part.
	* gnu/java/awt/peer/gtk/GdkGlyphVector.java,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGlyphVector.c:
	New class, with native part.
	* gnu/java/awt/peer/gtk/GdkGraphics2D.java,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c:
	implement setFont, cairoSetFont, drawGlyphVector, cairoShowGlyphs.

From-SVN: r72931
2003-10-25 18:41:45 +00:00
Thomas Fitzsimmons f2d0e05d4e GtkDialogPeer.java (handleEvent): Remove method.
2003-10-24  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* gnu/java/awt/peer/gtk/GtkDialogPeer.java (handleEvent):
	Remove method.
	* gnu/java/awt/peer/gtk/GtkWindowPeer.java (postWindowEvent):
	New method.
	* java/awt/Window.java (Window(Window,GraphicsConfiguration),
	show, hide, dispose, getOwnedWindows): Synchronize on tree lock.
	(dispose): Post WINDOW_CLOSED event.
	(addWindowFocusListener, addWindowStateListener): Assign result
	of multicaster add back to window listener.
	(removeWindowFocusListener, removeWindowStateListener): Assign
	result of multicaster remove back to window listener.
	(dispatchEventImpl): Add null checks for focus and state
	listeners.
	(processWindowEvent): Handle case where windowListener is null
	but state or focus listeners exist.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c: Add JNI
	glue for postWindowEvent.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
	(window_delete_cb, window_destroy_cb, window_show_cb,
	window_focus_in_cb, window_focus_out_cb, window_window_state_cb,
	window_get_new_state): New functions.
	* jni/gtk-peer/gtkpeer.h: Define window event and frame state
	macros.  Declare postWindowEventID.

From-SVN: r72906
2003-10-24 19:40:30 +00:00